From d48831777c7dd094f69039016aa6bc84e59b17e2 Mon Sep 17 00:00:00 2001 From: Ida Delphine Date: Wed, 15 Jul 2026 13:39:09 +0100 Subject: [PATCH] fix settings debug disappearance --- .../kotlin/net/newpipe/app/platform/AndroidBuildInfo.kt | 4 ++-- .../net/newpipe/app/preferences/AppearancePreference.kt | 2 +- .../newpipe/app/screen/settings/AppearanceSettingsScreen.kt | 2 +- .../kotlin/net/newpipe/app/composable/ListPreferenceTest.kt | 6 +++--- .../net/newpipe/app/composable/SwitchPreferenceTest.kt | 2 +- .../app/screen/settings/AppearanceSettingsScreenTest.kt | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/shared/src/androidMain/kotlin/net/newpipe/app/platform/AndroidBuildInfo.kt b/shared/src/androidMain/kotlin/net/newpipe/app/platform/AndroidBuildInfo.kt index a32d7ca66..fbcd8ea3b 100644 --- a/shared/src/androidMain/kotlin/net/newpipe/app/platform/AndroidBuildInfo.kt +++ b/shared/src/androidMain/kotlin/net/newpipe/app/platform/AndroidBuildInfo.kt @@ -16,8 +16,8 @@ import org.koin.core.annotation.Singleton @Singleton(binds = [BuildInfo::class]) class AndroidBuildInfo(private val context: Context) : BuildInfo { - override val isDebug: Boolean = - context.applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE != 0 + override val isDebug: Boolean + get() = (context.applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE != 0) || !isReleaseApk @get:SuppressLint("NewApi") @OptIn(ExperimentalStdlibApi::class) diff --git a/shared/src/commonMain/kotlin/net/newpipe/app/preferences/AppearancePreference.kt b/shared/src/commonMain/kotlin/net/newpipe/app/preferences/AppearancePreference.kt index 184b5f6c8..ce3b36584 100644 --- a/shared/src/commonMain/kotlin/net/newpipe/app/preferences/AppearancePreference.kt +++ b/shared/src/commonMain/kotlin/net/newpipe/app/preferences/AppearancePreference.kt @@ -36,4 +36,4 @@ object AppearancePreferences { const val DEFAULT_LIST_VIEW_MODE = LIST_VIEW_AUTO const val DEFAULT_HOLD_TO_APPEND = true const val DEFAULT_MAIN_TABS_POSITION = false -} \ No newline at end of file +} diff --git a/shared/src/commonMain/kotlin/net/newpipe/app/screen/settings/AppearanceSettingsScreen.kt b/shared/src/commonMain/kotlin/net/newpipe/app/screen/settings/AppearanceSettingsScreen.kt index 1494ee56c..0b64a17ab 100644 --- a/shared/src/commonMain/kotlin/net/newpipe/app/screen/settings/AppearanceSettingsScreen.kt +++ b/shared/src/commonMain/kotlin/net/newpipe/app/screen/settings/AppearanceSettingsScreen.kt @@ -219,4 +219,4 @@ fun AppearanceSettingsScreenContent( @Composable private fun AppearanceSettingsScreenPreview() { AppearanceSettingsScreenContent() -} \ No newline at end of file +} diff --git a/shared/src/commonTest/kotlin/net/newpipe/app/composable/ListPreferenceTest.kt b/shared/src/commonTest/kotlin/net/newpipe/app/composable/ListPreferenceTest.kt index 2e9629ae9..2e88bedfb 100644 --- a/shared/src/commonTest/kotlin/net/newpipe/app/composable/ListPreferenceTest.kt +++ b/shared/src/commonTest/kotlin/net/newpipe/app/composable/ListPreferenceTest.kt @@ -47,8 +47,8 @@ class ListPreferenceTest { ) } - onNodeWithText("Choose").performClick() // open the dialog - onNodeWithText("Option B").performClick() // pick an option + onNodeWithText("Choose").performClick() + onNodeWithText("Option B").performClick() assertEquals("b", selected) } -} \ No newline at end of file +} diff --git a/shared/src/commonTest/kotlin/net/newpipe/app/composable/SwitchPreferenceTest.kt b/shared/src/commonTest/kotlin/net/newpipe/app/composable/SwitchPreferenceTest.kt index d84d9f272..00ea451c4 100644 --- a/shared/src/commonTest/kotlin/net/newpipe/app/composable/SwitchPreferenceTest.kt +++ b/shared/src/commonTest/kotlin/net/newpipe/app/composable/SwitchPreferenceTest.kt @@ -44,4 +44,4 @@ class SwitchPreferenceTest { onNodeWithText(title).performClick() assertFalse(fired) } -} \ No newline at end of file +} diff --git a/shared/src/commonTest/kotlin/net/newpipe/app/screen/settings/AppearanceSettingsScreenTest.kt b/shared/src/commonTest/kotlin/net/newpipe/app/screen/settings/AppearanceSettingsScreenTest.kt index 1e24f2f01..8cf84925f 100644 --- a/shared/src/commonTest/kotlin/net/newpipe/app/screen/settings/AppearanceSettingsScreenTest.kt +++ b/shared/src/commonTest/kotlin/net/newpipe/app/screen/settings/AppearanceSettingsScreenTest.kt @@ -12,7 +12,7 @@ import androidx.compose.ui.test.v2.runComposeUiTest import com.russhwolf.settings.MapSettings import com.russhwolf.settings.Settings import net.newpipe.app.extensions.withKoin -import net.newpipe.app.viewmodel.settings.AppearancePreferences +import net.newpipe.app.preferences.AppearancePreferences import newpipe.shared.generated.resources.Res import newpipe.shared.generated.resources.settings_category_appearance_title import newpipe.shared.generated.resources.theme_title @@ -58,4 +58,4 @@ class AppearanceSettingsScreenTest { } ) } -} \ No newline at end of file +}