Hide downloaded chapter status in locked tachi mode

This commit is contained in:
Jay 2020-02-23 12:04:16 -08:00
parent 915df39365
commit 420acc59e3
3 changed files with 8 additions and 4 deletions

View File

@ -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)

View File

@ -338,7 +338,7 @@ class ChaptersController() : NucleusController<ChaptersPresenter>(),
}
fun onChapterStatusChange(download: Download) {
getHolder(download.chapter)?.notifyStatus(download.status)
getHolder(download.chapter)?.notifyStatus(download.status, presenter.isLockedFromSearch)
}
private fun getHolder(chapter: Chapter): ChapterHolder? {

View File

@ -171,7 +171,7 @@
<string name="pref_enable_automatic_updates">Check for updates</string>
<string name="pref_enable_automatic_updates_summary">Automatically check for new app versions</string>
<string name="pref_secure_screen">Secure screen</string>
<string name="pref_secure_screen_summary">Hide Tachiyomi from the overview screen</string>
<string name="pref_secure_screen_summary">Hide Tachiyomi from the recents screen</string>
<string name="pref_category_security">Security</string>
<!-- Library section -->