mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
change default icon
This commit is contained in:
parent
c02aa44c96
commit
ad99dee4dc
1 changed files with 7 additions and 1 deletions
|
@ -1114,7 +1114,13 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener, BiometricCa
|
||||||
// Change library icon with logo of current api in sync
|
// Change library icon with logo of current api in sync
|
||||||
libraryViewModel = ViewModelProvider(this)[LibraryViewModel::class.java]
|
libraryViewModel = ViewModelProvider(this)[LibraryViewModel::class.java]
|
||||||
libraryViewModel?.currentApiName?.observe(this) {
|
libraryViewModel?.currentApiName?.observe(this) {
|
||||||
val icon = libraryViewModel?.currentSyncApi?.icon ?: R.drawable.library_icon
|
val syncAPI = libraryViewModel?.currentSyncApi
|
||||||
|
Log.i("SYNC_API", syncAPI?.name.toString())
|
||||||
|
val icon = if (syncAPI?.name == "Local") {
|
||||||
|
R.drawable.library_icon
|
||||||
|
} else {
|
||||||
|
syncAPI?.icon ?: R.drawable.library_icon
|
||||||
|
}
|
||||||
|
|
||||||
binding?.apply {
|
binding?.apply {
|
||||||
navRailView.menu.findItem(R.id.navigation_library)?.setIcon(icon)
|
navRailView.menu.findItem(R.id.navigation_library)?.setIcon(icon)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue