Fix default channel shown in UI

This commit is contained in:
topjohnwu
2026-08-20 21:36:49 +00:00
committed by John Wu
parent 0675a18a3a
commit 5262ecdf82
3 changed files with 7 additions and 2 deletions
@@ -116,6 +116,11 @@ object Config : PreferenceConfig, DBConfig {
private var localePrefs by preference(Key.LOCALE, "")
var doh by preference(Key.DOH, false)
var updateChannel by preference(Key.RELEASE_CHANNEL, Value.DEFAULT_CHANNEL)
val updateChannelIndex get() = when (updateChannel) {
Value.DEFAULT_CHANNEL ->
if (BuildConfig.DEBUG) Value.DEBUG_CHANNEL else Value.STABLE_CHANNEL
else -> updateChannel
}
var customChannelUrl by preference(Key.CUSTOM_CHANNEL, "")
var downloadDir by preference(Key.DOWNLOAD_DIR, "")
var randName by preference(Key.RAND_NAME, true)