mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Revert hide updates/history
This commit is contained in:
		| @@ -15,9 +15,6 @@ object PreferenceKeys { | ||||
|  | ||||
|     const val hideBottomBar = "pref_hide_bottom_bar_on_scroll" | ||||
|  | ||||
|     const val showNavUpdates = "pref_nav_show_updates" | ||||
|     const val showNavHistory = "pref_nav_show_history" | ||||
|  | ||||
|     const val enableTransitions = "pref_enable_transitions_key" | ||||
|  | ||||
|     const val doubleTapAnimationSpeed = "pref_double_tap_anim_speed" | ||||
|   | ||||
| @@ -65,9 +65,6 @@ class PreferencesHelper(val context: Context) { | ||||
|  | ||||
|     fun hideBottomBar() = flowPrefs.getBoolean(Keys.hideBottomBar, true) | ||||
|  | ||||
|     fun showNavUpdates() = prefs.getBoolean(Keys.showNavUpdates, true) | ||||
|     fun showNavHistory() = prefs.getBoolean(Keys.showNavHistory, true) | ||||
|  | ||||
|     fun useBiometricLock() = flowPrefs.getBoolean(Keys.useBiometricLock, false) | ||||
|  | ||||
|     fun lockAppAfter() = flowPrefs.getInt(Keys.lockAppAfter, 0) | ||||
|   | ||||
| @@ -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 | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -149,7 +149,6 @@ | ||||
|       <!-- General section --> | ||||
|     <string name="pref_category_theme">Theme</string> | ||||
|     <string name="pref_category_locale">Locale</string> | ||||
|     <string name="pref_category_navigation">Navigation</string> | ||||
|     <string name="pref_theme_mode">Dark mode</string> | ||||
|     <string name="theme_system">Follow system</string> | ||||
|     <string name="theme_light">Off</string> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user