Commit 8b2ab778 authored by vvb2060's avatar vvb2060 Committed by John Wu

Fix show canary channel on stable build

parent 35f3766e
...@@ -144,9 +144,10 @@ object UpdateChannel : BaseSettingsItem.Selector() { ...@@ -144,9 +144,10 @@ object UpdateChannel : BaseSettingsItem.Selector() {
} }
override val title = R.string.settings_update_channel_title.asTransitive() override val title = R.string.settings_update_channel_title.asTransitive()
override val entries: Array<String> = resources.getStringArray(R.array.update_channel).apply { override val entries: Array<String> = resources.getStringArray(R.array.update_channel).let {
if (BuildConfig.VERSION_CODE % 100 == 0) if (BuildConfig.VERSION_CODE % 100 == 0)
toMutableList().apply { removeAt(Config.Value.CANARY_CHANNEL) }.toTypedArray() it.toMutableList().apply { removeAt(Config.Value.CANARY_CHANNEL) }.toTypedArray()
else it
} }
override val description override val description
get() = entries.getOrNull(value)?.asTransitive() ?: TransitiveText.String(entries[0]) get() = entries.getOrNull(value)?.asTransitive() ?: TransitiveText.String(entries[0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment