mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
make it more concise
This commit is contained in:
parent
2f5b65cd99
commit
47bc6cee67
1 changed files with 2 additions and 6 deletions
|
@ -586,7 +586,8 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCa
|
|||
}
|
||||
}
|
||||
|
||||
fun changeLibraryIcon() {
|
||||
// observing library vm changes icon without app restart
|
||||
libraryViewModel.currentApiName.observe(this@MainActivity) {
|
||||
when (lastAPI) {
|
||||
"MAL" -> setLibraryIcon(R.drawable.mal_logo)
|
||||
"AniList" -> setLibraryIcon(R.drawable.ic_anilist_icon)
|
||||
|
@ -594,11 +595,6 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCa
|
|||
else -> setLibraryIcon(R.drawable.library_icon)
|
||||
}
|
||||
}
|
||||
|
||||
// observing library vm changes icon without app restart
|
||||
libraryViewModel.currentApiName.observe(this@MainActivity) {
|
||||
changeLibraryIcon()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue