fix settings debug disappearance

This commit is contained in:
Ida Delphine
2026-09-17 15:51:13 +02:00
committed by Tobi
parent 9f58974e08
commit d48831777c
6 changed files with 10 additions and 10 deletions
@@ -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)
@@ -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
}
}
@@ -219,4 +219,4 @@ fun AppearanceSettingsScreenContent(
@Composable
private fun AppearanceSettingsScreenPreview() {
AppearanceSettingsScreenContent()
}
}
@@ -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)
}
}
}
@@ -44,4 +44,4 @@ class SwitchPreferenceTest {
onNodeWithText(title).performClick()
assertFalse(fired)
}
}
}
@@ -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 {
}
)
}
}
}