Remove confirm exit option

Redundant with predictive back, but also just sort of pointless since it doesn't help
with any sort of app state retention.

(cherry picked from commit 8f4bc71cf7b99fe0b0d2ea68dfca0140477686cc)

# Conflicts:
#	app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsGeneralScreen.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
This commit is contained in:
arkon
2023-05-31 18:51:01 -04:00
committed by Jobobby04
parent 728c715bf4
commit 8877ddb015
5 changed files with 7 additions and 44 deletions
@@ -16,7 +16,6 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.core.os.LocaleListCompat
import eu.kanade.domain.base.BasePreferences
import eu.kanade.domain.ui.UiPreferences
import eu.kanade.presentation.more.settings.Preference
import eu.kanade.tachiyomi.R
@@ -35,12 +34,16 @@ object SettingsGeneralScreen : SearchableSettings {
@Composable
override fun getPreferences(): List<Preference> {
val prefs = remember { Injekt.get<BasePreferences>() }
val libraryPrefs = remember { Injekt.get<LibraryPreferences>() }
// SY -->
val uiPrefs = remember { Injekt.get<UiPreferences>() }
// SY <--
return mutableListOf<Preference>().apply {
val context = LocalContext.current
val langs = remember { getLangs(context) }
var currentLanguage by remember { mutableStateOf(AppCompatDelegate.getApplicationLocales().get(0)?.toLanguageTag() ?: "") }
return buildList {
add(
Preference.PreferenceItem.SwitchPreference(
pref = libraryPrefs.newShowUpdatesCount(),
@@ -48,14 +51,6 @@ object SettingsGeneralScreen : SearchableSettings {
),
)
add(
Preference.PreferenceItem.SwitchPreference(
pref = prefs.confirmExit(),
title = stringResource(R.string.pref_confirm_exit),
),
)
val context = LocalContext.current
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
add(
Preference.PreferenceItem.TextPreference(
@@ -70,8 +65,6 @@ object SettingsGeneralScreen : SearchableSettings {
)
}
val langs = remember { getLangs(context) }
var currentLanguage by remember { mutableStateOf(AppCompatDelegate.getApplicationLocales().get(0)?.toLanguageTag() ?: "") }
add(
Preference.PreferenceItem.BasicListPreference(
value = currentLanguage,