mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 08:42:00 +01:00
Fix crash when tab isn't available
This commit is contained in:
parent
d593362ba8
commit
0c988d95ee
@ -100,10 +100,10 @@ class BrowseController :
|
||||
activity?.tabs?.apply {
|
||||
val updates = preferences.extensionUpdatesCount().get()
|
||||
if (updates > 0) {
|
||||
val badge: BadgeDrawable = getTabAt(1)!!.orCreateBadge
|
||||
badge.isVisible = true
|
||||
val badge: BadgeDrawable? = getTabAt(1)?.orCreateBadge
|
||||
badge?.isVisible = true
|
||||
} else {
|
||||
getTabAt(EXTENSIONS_CONTROLLER)!!.removeBadge()
|
||||
getTabAt(EXTENSIONS_CONTROLLER)?.removeBadge()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user