From 420acc59e3cec0640d7036ed1caf9ffafff16cec Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 23 Feb 2020 12:04:16 -0800 Subject: [PATCH] Hide downloaded chapter status in locked tachi mode --- .../eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt | 8 ++++++-- .../tachiyomi/ui/manga/chapter/ChaptersController.kt | 2 +- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt index c5cc1cfc1e..77624a5598 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChapterHolder.kt @@ -71,10 +71,14 @@ class ChapterHolder( "" } - notifyStatus(item.status) + notifyStatus(item.status, item.isLocked) } - fun notifyStatus(status: Int) = with(download_text) { + fun notifyStatus(status: Int, locked: Boolean) = with(download_text) { + if (locked) { + text = "" + return + } when (status) { Download.QUEUE -> setText(R.string.chapter_queued) Download.DOWNLOADING -> setText(R.string.chapter_downloading) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt index 018eb26fb3..49128d07da 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt @@ -338,7 +338,7 @@ class ChaptersController() : NucleusController(), } fun onChapterStatusChange(download: Download) { - getHolder(download.chapter)?.notifyStatus(download.status) + getHolder(download.chapter)?.notifyStatus(download.status, presenter.isLockedFromSearch) } private fun getHolder(chapter: Chapter): ChapterHolder? { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1e5abe53ca..9190d5aea8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -171,7 +171,7 @@ Check for updates Automatically check for new app versions Secure screen - Hide Tachiyomi from the overview screen + Hide Tachiyomi from the recents screen Security