Save only visible tabs when save last tab is enabled

This commit is contained in:
Prathamesh More 2022-05-31 19:34:31 +05:30
parent aee5bfdf50
commit 67d65a1532

View file

@ -113,7 +113,9 @@ class MainActivity : AbsCastActivity(), OnThemeChangedListener {
} }
private fun saveTab(id: Int) { private fun saveTab(id: Int) {
PreferenceUtil.lastTab = id if (PreferenceUtil.libraryCategory.firstOrNull { it.category.id == id }?.visible == true) {
PreferenceUtil.lastTab = id
}
} }
override fun onSupportNavigateUp(): Boolean = override fun onSupportNavigateUp(): Boolean =