mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-10-15 12:11:49 +00:00
fix settings debug disappearance
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user