From 19c713ebb29fce8b8476829ae2c49143b88cc728 Mon Sep 17 00:00:00 2001 From: len Date: Sun, 23 Oct 2016 22:37:20 +0200 Subject: [PATCH] Minor changes --- .../java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt index c349779d6..69cd6dff1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt @@ -332,9 +332,9 @@ class ReaderPresenter : BasePresenter() { fun retryPage(page: Page?) { if (page != null && source is OnlineSource) { page.status = Page.QUEUE - if (page.imagePath != null) { - val file = File(page.imagePath) - chapterCache.removeFileFromCache(file.name) + val path = page.imagePath + if (!path.isNullOrEmpty() && !page.chapter.isDownloaded) { + chapterCache.removeFileFromCache(File(path).name) } loader.retryPage(page) }