diff --git a/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt b/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt index 357879fbe..5b1e54611 100644 --- a/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt +++ b/app/src/main/java/com/github/libretube/ui/activities/MainActivity.kt @@ -54,7 +54,12 @@ class MainActivity : BaseActivity() { lateinit var navController: NavController private var startFragmentId = R.id.homeFragment - val autoRotationEnabled = PreferenceHelper.getBoolean(PreferenceKeys.AUTO_ROTATION, false) + val autoRotationEnabled: Boolean by lazy { + PreferenceHelper.getBoolean( + PreferenceKeys.AUTO_ROTATION, + resources.getBoolean(R.bool.config_default_auto_rotation_pref) + ) + } lateinit var searchView: SearchView private lateinit var searchItem: MenuItem diff --git a/app/src/main/res/values-television/config.xml b/app/src/main/res/values-television/config.xml new file mode 100644 index 000000000..861d394b3 --- /dev/null +++ b/app/src/main/res/values-television/config.xml @@ -0,0 +1,3 @@ + + true + diff --git a/app/src/main/res/values/config.xml b/app/src/main/res/values/config.xml new file mode 100644 index 000000000..5dfa9b145 --- /dev/null +++ b/app/src/main/res/values/config.xml @@ -0,0 +1,3 @@ + + false + diff --git a/app/src/main/res/xml/general_settings.xml b/app/src/main/res/xml/general_settings.xml index e98d056ff..13110bd8a 100644 --- a/app/src/main/res/xml/general_settings.xml +++ b/app/src/main/res/xml/general_settings.xml @@ -31,7 +31,7 @@ app:key="audio_only_mode" />