diff --git a/app/src/main/java/com/nextcloud/client/jobs/gallery/GalleryImageGenerationJob.kt b/app/src/main/java/com/nextcloud/client/jobs/gallery/GalleryImageGenerationJob.kt index 2e532c00ac88..5ca2202ea0aa 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/gallery/GalleryImageGenerationJob.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/gallery/GalleryImageGenerationJob.kt @@ -119,10 +119,12 @@ class GalleryImageGenerationJob(private val user: User, private val storageManag onNewThumbnail() - val local = decodeLocalThumbnail(file) - if (local != null) { - ThumbnailsCacheManager.addBitmapToCache(cacheKey, local) - return@withContext applyVideoOverlayIfNeeded(file, local) + if (file.isDown) { + val local = decodeLocalThumbnail(file) + if (local != null) { + ThumbnailsCacheManager.addBitmapToCache(cacheKey, local) + return@withContext applyVideoOverlayIfNeeded(file, local) + } } val remote = semaphore.withPermit { fetchFromServer(file) }