Fix sending of saved GIFs.

This commit is contained in:
John Preston 2019-03-11 09:45:06 +04:00
parent a886c598c1
commit b0ff443eac
3 changed files with 5 additions and 9 deletions

View File

@ -363,11 +363,9 @@ void GifsListWidget::selectInlineResult(int row, int column) {
} else if (document->loading()) {
document->cancel();
} else {
DocumentOpenClickHandler::Open(
document->save(
document->stickerOrGifOrigin(),
document,
nullptr,
ActionOnLoadNone);
QString());
}
} else if (const auto inlineResult = item->getResult()) {
if (inlineResult->onChoose(item)) {

View File

@ -850,7 +850,7 @@ void DocumentData::save(
setLocation(FileLocation(toFile));
Local::writeFileLocation(mediaKey(), FileLocation(toFile));
} else if (l.accessEnable()) {
auto alreadyName = l.name();
const auto &alreadyName = l.name();
if (alreadyName != toFile) {
QFile(toFile).remove();
QFile(alreadyName).copy(toFile);

View File

@ -265,11 +265,9 @@ bool Result::onChoose(Layout::ItemBase *layout) {
} else if (_document->loading()) {
_document->cancel();
} else {
DocumentOpenClickHandler::Open(
_document->save(
Data::FileOriginSavedGifs(),
_document,
nullptr,
ActionOnLoadNone);
QString());
}
return false;
}