mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-25 06:11:04 +03:00
fix crash from navigation setting
This commit is contained in:
parent
b288adc767
commit
1c2be82196
2 changed files with 2 additions and 4 deletions
|
@ -37,9 +37,8 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
|
|||
defStyleRes: Int = R.style.Widget_Design_BottomNavigationView,
|
||||
) : BottomNavigationView(context, attrs, defStyleAttr, defStyleRes) {
|
||||
|
||||
private val libraryPreferences: LibraryPreferences = Injekt.get()
|
||||
|
||||
override fun inflateMenu(resId: Int) {
|
||||
val libraryPreferences: LibraryPreferences = Injekt.get()
|
||||
when (libraryPreferences.bottomNavStyle().get()) {
|
||||
1 -> super.inflateMenu(R.menu.main_nav_history)
|
||||
2 -> super.inflateMenu(R.menu.main_nav_no_manga)
|
||||
|
|
|
@ -13,9 +13,8 @@ class TachiyomiNavigationRailView @JvmOverloads constructor(
|
|||
attrs: AttributeSet? = null,
|
||||
) : NavigationRailView(context, attrs) {
|
||||
|
||||
private val libraryPreferences: LibraryPreferences = Injekt.get()
|
||||
|
||||
override fun inflateMenu(resId: Int) {
|
||||
val libraryPreferences: LibraryPreferences = Injekt.get()
|
||||
when (libraryPreferences.bottomNavStyle().get()) {
|
||||
1 -> super.inflateMenu(R.menu.main_nav_history)
|
||||
2 -> super.inflateMenu(R.menu.main_nav_no_manga)
|
||||
|
|
Loading…
Reference in a new issue