2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

gif redesign done, started ClipReader - gif animation reader in separate thread

This commit is contained in:
John Preston
2015-12-13 20:05:32 +03:00
parent 6100c1dcca
commit a66c051eb5
8 changed files with 351 additions and 78 deletions

View File

@@ -888,7 +888,7 @@ void DocumentOpenLink::doOpen(DocumentData *data) {
} else if (data->size < MediaViewImageSizeLimit && location.accessEnable()) {
QImageReader reader(location.name());
if (reader.canRead()) {
if (reader.supportsAnimation() && reader.imageCount() > 1 && App::hoveredLinkItem()) {
if (reader.supportsAnimation() && reader.imageCount() > 1 && App::hoveredLinkItem() && App::hoveredLinkItem()->getMedia() && App::hoveredLinkItem()->getMedia()->type() == MediaTypeGif) {
startGif(App::hoveredLinkItem(), location);
} else if (App::hoveredLinkItem() || App::contextItem()) {
App::wnd()->showDocument(data, App::hoveredLinkItem() ? App::hoveredLinkItem() : App::contextItem());