feat: enhance navigation (#450)

* feat: enhance navigation

* fix: leaving settings always unlocks drawer

* feat: set app settings inside a frame layout

In order to add a toolbar with a back button in settings I needed to extend from a fragment
so I converted SettingsFragment into a fragment and created SettingsContainerFragment,
the latter is injected as a child of SettingsFragment inside a FrameLayout.

Since SettingsContainerFragment extends from PreferenceFragmentCompat, this allows
to swap it for other and, in the bigger picture, allow an arbitrary organization.

* fix: onStop declaration on wrong class

* fix: equalizer not respecting navigation ui directives

* Revert "fix: equalizer not respecting navigation ui directives"

This reverts commit eeb125542d41760059e3a7c7653abf4d54a538f0.

* fix: navbar + bottom sheet behavior on equalizer fragment

* Revert "fix: onStop declaration on wrong class"

This reverts commit 34d354d8039ac70798b880bf99c808ef00a1e330.

* Revert "feat: set app settings inside a frame layout"

This reverts commit 52cfd36b09c461de72bed9b07a8c8852856c3421.

* chore: set experimental label to settings title

Hide bottom navigation bar on portrait and unlock drawer on portrait
This commit is contained in:
Tom 2026-02-26 12:14:42 -03:00 committed by GitHub
parent 932d1aaa8c
commit 145bb82eb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 376 additions and 42 deletions

View file

@ -30,6 +30,8 @@ object Preferences {
private const val IMAGE_CACHE_SIZE = "image_cache_size"
private const val STREAMING_CACHE_SIZE = "streaming_cache_size"
private const val LANDSCAPE_ITEMS_PER_ROW = "landscape_items_per_row"
private const val ENABLE_DRAWER_ON_PORTRAIT = "enable_drawer_on_portrait"
private const val HIDE_BOTTOM_NAVBAR_ON_PORTRAIT = "hide_bottom_navbar_on_portrait"
private const val IMAGE_SIZE = "image_size"
private const val MAX_BITRATE_WIFI = "max_bitrate_wifi"
private const val MAX_BITRATE_MOBILE = "max_bitrate_mobile"
@ -310,6 +312,16 @@ object Preferences {
return App.getInstance().preferences.getString(LANDSCAPE_ITEMS_PER_ROW, "4")!!.toInt()
}
@JvmStatic
fun getEnableDrawerOnPortrait(): Boolean {
return App.getInstance().preferences.getBoolean(ENABLE_DRAWER_ON_PORTRAIT, false)
}
@JvmStatic
fun getHideBottomNavbarOnPortrait(): Boolean {
return App.getInstance().preferences.getBoolean(HIDE_BOTTOM_NAVBAR_ON_PORTRAIT, false)
}
@JvmStatic
fun getImageSize(): Int {
return App.getInstance().preferences.getString(IMAGE_SIZE, "-1")!!.toInt()