diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsItems.kt b/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsItems.kt index 901b5f3e0..fe176409b 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsItems.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsItems.kt @@ -144,9 +144,10 @@ object UpdateChannel : BaseSettingsItem.Selector() { } override val title = R.string.settings_update_channel_title.asTransitive() - override val entries: Array = resources.getStringArray(R.array.update_channel).apply { + override val entries: Array = resources.getStringArray(R.array.update_channel).let { 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 get() = entries.getOrNull(value)?.asTransitive() ?: TransitiveText.String(entries[0])