chore: Hide compose library on prod build

This commit is contained in:
Ahmad Ansori Palembani 2025-01-13 11:32:49 +07:00
parent f37e657a9b
commit 453ea32bc9
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -394,11 +394,13 @@ class SettingsAdvancedController : SettingsLegacyController() {
onClick { LibraryUpdateJob.startNow(context, target = Target.TRACKING) }
}
if (BuildConfig.FLAVOR == "dev" || BuildConfig.DEBUG || BuildConfig.NIGHTLY) {
switchPreference {
bindTo(basePreferences.composeLibrary())
title = context.getString(MR.strings.pref_use_compose_library).addBetaTag(context)
}
}
}
preferenceCategory {
titleRes = MR.strings.reader
@ -457,9 +459,9 @@ class SettingsAdvancedController : SettingsLegacyController() {
}
}
if (BuildConfig.FLAVOR == "dev" || BuildConfig.DEBUG || BuildConfig.NIGHTLY) {
preferenceCategory {
title = "Danger zone!"
isVisible = BuildConfig.FLAVOR == "dev" || BuildConfig.DEBUG || BuildConfig.NIGHTLY
preference {
title = "Crash the app!"
@ -491,6 +493,7 @@ class SettingsAdvancedController : SettingsLegacyController() {
}
}
}
}
@OptIn(DelicateCoroutinesApi::class)
private fun cleanupDownloads(removeRead: Boolean, removeNonFavorite: Boolean) {