From 8868f3e3df1821010c6a8d471d39d83397a34659 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Mon, 29 Sep 2014 23:35:15 +0400 Subject: [PATCH] Added preview for no-thumb PDF --- app/js/services.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index 80e37d21..b4134f02 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -2713,9 +2713,9 @@ angular.module('myApp.services', ['myApp.i18n']) doc.thumb = thumb; doc.canDownload = !(window.chrome && chrome.fileSystem && chrome.fileSystem.chooseEntry); - doc.withPreview = doc.canDownload && doc.thumb && doc.mime_type.match(/^(image\/|application\/pdf)/) ? 1 : 0; + doc.withPreview = doc.canDownload && doc.mime_type.match(/^(image\/|application\/pdf)/) ? 1 : 0; - if (doc.withPreview && isGif) { + if (isGif && doc.withPreview && doc.thumb) { doc.isSpecial = 'gif'; } else if (isAudio) {