From dff1f4dd52177eba565573b2f2608f3423c0f118 Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 30 Apr 2020 18:35:17 -0400 Subject: [PATCH] Add banner at top of library when downloaded only mode is enabled --- .../tachiyomi/ui/library/LibraryController.kt | 5 ++++ .../main/res/layout/library_controller.xml | 30 +++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 2507bfc74..f9566edf2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -35,6 +35,7 @@ import eu.kanade.tachiyomi.ui.main.MainActivity import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.util.system.toast +import eu.kanade.tachiyomi.util.view.visible import java.io.IOException import kotlinx.android.synthetic.main.main_activity.tabs import kotlinx.coroutines.flow.filter @@ -172,6 +173,10 @@ class LibraryController( is LibrarySettingsSheet.Display.BadgeGroup -> onDownloadBadgeChanged() } } + + if (preferences.downloadedOnly().get()) { + binding.downloadedOnly.visible() + } } override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) { diff --git a/app/src/main/res/layout/library_controller.xml b/app/src/main/res/layout/library_controller.xml index 45035f638..2f8350516 100644 --- a/app/src/main/res/layout/library_controller.xml +++ b/app/src/main/res/layout/library_controller.xml @@ -4,10 +4,34 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + android:layout_height="match_parent" + android:orientation="vertical"> + + + + + + + + + +