diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 0b589b33fe..ab2c49be7a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -72,8 +72,6 @@ class PreferencesHelper(val context: Context) { fun fullscreen() = rxPrefs.getBoolean(Keys.fullscreen, true) - fun notchDefaultCutoutMode() = rxPrefs.getBoolean(Keys.isDefaultNotchMode, false) - fun keepScreenOn() = rxPrefs.getBoolean(Keys.keepScreenOn, true) fun customBrightness() = rxPrefs.getBoolean(Keys.customBrightness, false) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 106a241e27..1bbfb659b2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -686,9 +686,7 @@ class ReaderActivity : BaseRxActivity(), subscriptions += preferences.colorFilterMode().asObservable() .subscribe { setColorFilter(preferences.colorFilter().getOrDefault()) } - subscriptions += preferences.notchDefaultCutoutMode().asObservable() - .subscribe { setNotchCutoutMode(preferences.notchDefaultCutoutMode().getOrDefault()) } - + this.setNotchCutoutMode() } /** @@ -803,12 +801,11 @@ class ReaderActivity : BaseRxActivity(), /** - * Sets notch cutout mode to "DEFAULT" mode if true and "NEVER" mode if false. - * In "NEVER" mode the space next to the notch won't be used and filled with a black background. + * Sets notch cutout mode to "NEVER", if mobile is in a landscape view */ - private fun setNotchCutoutMode(isDefault: Boolean) { + private fun setNotchCutoutMode() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - if (!isDefault) { + val currentOrientation = resources.configuration.orientation if(currentOrientation == Configuration.ORIENTATION_LANDSCAPE) { @@ -817,7 +814,6 @@ class ReaderActivity : BaseRxActivity(), WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER } - } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt index 24eccef800..0e23b82aae 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt @@ -88,18 +88,6 @@ class SettingsReaderController : SettingsController() { } } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - val cutout = activity?.window?.decorView?.rootWindowInsets?.displayCutout - - switchPreference { - key = Keys.isDefaultNotchMode - titleRes = R.string.pref_notch_display - summaryRes = R.string.pref_notch_display_summary - defaultValue = false - isEnabled = cutout != null // display option only when a mobile has a notch - } - } - preferenceCategory { titleRes = R.string.pager_viewer diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 0e8563d6b0..b731bea572 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -215,8 +215,6 @@ Szybkość podwójnego stuknięcia Pokazuj numer strony Kolor 32 bitowy - Użyj przestrzeni sąsiadującej z notchem - Działa tylko w widoku horyzontalnym, tak by notch nachodził na wyświetlaną stronę Przycinaj krawędzie Niestandardowa jasność Niestandardowy filtr kolorów diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0248cb2ca3..e84d5bf8f2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -216,8 +216,6 @@ Double tap animation speed Show page number 32-bit color - Use space next to the notch - Works only for the landscape view for the notch to overlap the displayed page Crop borders Use custom brightness Use custom color filter