Save only visible tabs when save last tab is enabled
This commit is contained in:
parent
aee5bfdf50
commit
67d65a1532
1 changed files with 3 additions and 1 deletions
|
@ -113,8 +113,10 @@ class MainActivity : AbsCastActivity(), OnThemeChangedListener {
|
|||
}
|
||||
|
||||
private fun saveTab(id: Int) {
|
||||
if (PreferenceUtil.libraryCategory.firstOrNull { it.category.id == id }?.visible == true) {
|
||||
PreferenceUtil.lastTab = id
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSupportNavigateUp(): Boolean =
|
||||
findNavController(R.id.fragment_container).navigateUp()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue