mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-15 13:37:29 +01:00
Added tabletUI option: "Automatic" (#6208)
* added automatic tablet ui option; useful for foldables * set automatic as default, rename setting * remove redundant checks Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> * remove redundant checks Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> * fix defaultValue Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
This commit is contained in:
@@ -53,6 +53,7 @@ object PreferenceValues {
|
||||
}
|
||||
|
||||
enum class TabletUiMode {
|
||||
AUTOMATIC,
|
||||
ALWAYS,
|
||||
LANDSCAPE,
|
||||
NEVER,
|
||||
|
||||
@@ -326,10 +326,7 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun incognitoMode() = flowPrefs.getBoolean(Keys.incognitoMode, false)
|
||||
|
||||
fun tabletUiMode() = flowPrefs.getEnum(
|
||||
Keys.tabletUiMode,
|
||||
if (context.applicationContext.isTablet()) Values.TabletUiMode.ALWAYS else Values.TabletUiMode.NEVER
|
||||
)
|
||||
fun tabletUiMode() = flowPrefs.getEnum(Keys.tabletUiMode, Values.TabletUiMode.AUTOMATIC)
|
||||
|
||||
fun extensionInstaller() = flowPrefs.getEnum(
|
||||
Keys.extensionInstaller,
|
||||
|
||||
Reference in New Issue
Block a user