Skip to content

Commit

Permalink
optimize: 设置点播地址
Browse files Browse the repository at this point in the history
  • Loading branch information
Greatwallcorner committed Jul 16, 2024
1 parent 513630b commit 74a4baf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composeApp/src/commonMain/kotlin/com/corner/ui/Settings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ fun setConfig(textFieldValue: String?) {
SnackBar.postMsg("不可为空")
return@launch
}
SettingStore.setValue(SettingType.VOD, textFieldValue)
val config = Db.Config.find(textFieldValue, ConfigType.SITE.ordinal.toLong())
if (config == null) {
Db.Config.save(
Expand All @@ -388,7 +389,6 @@ fun setConfig(textFieldValue: String?) {
} else {
Db.Config.updateUrl(config.id, textFieldValue)
}
SettingStore.setValue(SettingType.VOD, textFieldValue)
ApiConfig.api.cfg.value = Db.Config.find(textFieldValue, ConfigType.SITE.ordinal.toLong())
initConfig()
}
Expand Down

0 comments on commit 74a4baf

Please sign in to comment.