MainActivity fixes (#6591)

* Reduce notifyDataSetChanged calls when category count is disabled

* Fix category tabs briefly showing when it's supposed to be disabled

Also fix tabs showing when activity recreated

* Lift appbar when tab is hidden

Check against tab visibility instead of viewpager

* Restore selected nav item after recreate

* Simplify SHORTCUT_MANGA intent handling

Don't need to change controller if the topmost controller is the target
This commit is contained in:
Ivan Iskandar
2022-02-12 22:58:58 +07:00
committed by GitHub
parent ae2a6a3d4f
commit 2932ed670f
6 changed files with 70 additions and 65 deletions
@@ -4,7 +4,10 @@ import com.google.android.material.tabs.TabLayout
interface TabbedController {
fun configureTabs(tabs: TabLayout) {}
/**
* @return true to let activity updates tabs visibility (to visible)
*/
fun configureTabs(tabs: TabLayout): Boolean = true
fun cleanupTabs(tabs: TabLayout) {}
}