mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-15 13:37:29 +01:00
Revert hide updates/history
This commit is contained in:
@@ -5,7 +5,6 @@ import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Toast
|
||||
@@ -466,7 +465,6 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
||||
if (visible) {
|
||||
if (collapse) {
|
||||
bottomNavAnimator?.expand()
|
||||
updateNavMenu(it.menu)
|
||||
}
|
||||
bottomViewNavigationBehavior?.slideUp(it)
|
||||
} else {
|
||||
@@ -482,15 +480,9 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
||||
private fun showSideNav(visible: Boolean) {
|
||||
binding.sideNav?.let {
|
||||
it.isVisible = visible
|
||||
updateNavMenu(it.menu)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateNavMenu(menu: Menu) {
|
||||
menu.findItem(R.id.nav_updates).isVisible = preferences.showNavUpdates()
|
||||
menu.findItem(R.id.nav_history).isVisible = preferences.showNavHistory()
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to manually offset a view within the activity's child views that might be cut off due to
|
||||
* the collapsing AppBarLayout.
|
||||
|
||||
@@ -45,6 +45,11 @@ class SettingsGeneralController : SettingsController() {
|
||||
titleRes = R.string.pref_confirm_exit
|
||||
defaultValue = false
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.hideBottomBar
|
||||
titleRes = R.string.pref_hide_bottom_bar_on_scroll
|
||||
defaultValue = true
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
preference {
|
||||
@@ -261,25 +266,5 @@ class SettingsGeneralController : SettingsController() {
|
||||
summary = "%s"
|
||||
}
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_navigation
|
||||
|
||||
switchPreference {
|
||||
key = Keys.hideBottomBar
|
||||
titleRes = R.string.pref_hide_bottom_bar_on_scroll
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.showNavUpdates
|
||||
titleRes = R.string.label_recent_updates
|
||||
defaultValue = true
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.showNavHistory
|
||||
titleRes = R.string.label_recent_manga
|
||||
defaultValue = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user