Show downloaded only banner in all views
This commit is contained in:
parent
4b78ff324d
commit
7194f65203
4 changed files with 23 additions and 22 deletions
|
@ -193,10 +193,6 @@ class LibraryController(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preferences.downloadedOnly().get()) {
|
|
||||||
binding.downloadedOnly.isVisible = true
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.btnGlobalSearch.clicks()
|
binding.btnGlobalSearch.clicks()
|
||||||
.onEach {
|
.onEach {
|
||||||
router.pushController(
|
router.pushController(
|
||||||
|
|
|
@ -165,6 +165,10 @@ class MainActivity : BaseActivity<MainActivityBinding>() {
|
||||||
preferences.extensionUpdatesCount()
|
preferences.extensionUpdatesCount()
|
||||||
.asImmediateFlow { setExtensionsBadge() }
|
.asImmediateFlow { setExtensionsBadge() }
|
||||||
.launchIn(scope)
|
.launchIn(scope)
|
||||||
|
|
||||||
|
preferences.downloadedOnly()
|
||||||
|
.asImmediateFlow { binding.downloadedOnly.isVisible = it }
|
||||||
|
.launchIn(scope)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onNewIntent(intent: Intent) {
|
override fun onNewIntent(intent: Intent) {
|
||||||
|
|
|
@ -10,24 +10,6 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/downloaded_only"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/green"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:padding="4dp"
|
|
||||||
android:text="@string/label_downloaded_only"
|
|
||||||
android:textColor="@color/md_white_1000" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_global_search"
|
android:id="@+id/btn_global_search"
|
||||||
style="@style/Theme.Widget.Button"
|
style="@style/Theme.Widget.Button"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/root_coordinator"
|
android:id="@+id/root_coordinator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -25,6 +26,24 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/downloaded_only"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/green"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:text="@string/label_downloaded_only"
|
||||||
|
android:textColor="@color/md_white_1000" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</eu.kanade.tachiyomi.widget.ElevationAppBarLayout>
|
</eu.kanade.tachiyomi.widget.ElevationAppBarLayout>
|
||||||
|
|
||||||
<com.bluelinelabs.conductor.ChangeHandlerFrameLayout
|
<com.bluelinelabs.conductor.ChangeHandlerFrameLayout
|
||||||
|
|
Reference in a new issue