2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

autoload settings box added, working for voice messages and gifs (photos TODO)

This commit is contained in:
John Preston
2015-12-24 00:19:57 +03:00
parent b94533fcb2
commit 7c7d517b34
16 changed files with 300 additions and 62 deletions

View File

@@ -615,15 +615,10 @@ void MediaView::onSaveAs() {
}
void MediaView::onDocClick() {
QString fname = _doc->already(true);
if (fname.isEmpty()) {
if (_doc->loader) {
onSaveCancel();
} else {
onDownload();
}
if (_doc->loader && _doc->loader->started()) {
onSaveCancel();
} else {
psOpenFile(fname);
DocumentOpenLink::doOpen(_doc);
}
}
@@ -1585,9 +1580,8 @@ void MediaView::preloadData(int32 delta) {
case MediaTypeSticker:
DocumentData *doc = media->getDocument();
doc->forget();
if (!doc->data.isEmpty()) {
if (!doc->data.isEmpty() && doc->prepareAutoLoader(item)) {
doc->data.clear();
doc->prepareAutoLoader();
}
break;
}