Merge code

This commit is contained in:
2022-03-22 20:23:47 +08:00
parent c436615d1b
commit 751610edaa
2 changed files with 8 additions and 6 deletions

View File

@@ -35,8 +35,8 @@ object HookConst {
const val REMOVE_DNDALERT_NOTIFY = "_remove_dndalert_notify"
const val NOTIFY_ICON_DATAS = "_notify_icon_datas"
const val SOURCE_SYNC_WAY = "_source_sync_way"
const val SOURCE_SYNC_WAY_CUSTOM_URL = "_source_sync_way_custom_url"
const val SOURCE_SYNC_WAY = "_rule_source_sync_way"
const val SOURCE_SYNC_WAY_CUSTOM_URL = "_rule_source_sync_way_custom_url"
const val TYPE_SOURCE_SYNC_WAY_1 = 1000
const val TYPE_SOURCE_SYNC_WAY_2 = 2000

View File

@@ -105,24 +105,26 @@ object IconRuleManagerTool {
diaSfRd3.isChecked = false
diaSfTextLin.isVisible = false
sourceType = TYPE_SOURCE_SYNC_WAY_1
context.modulePrefs.putInt(SOURCE_SYNC_WAY, TYPE_SOURCE_SYNC_WAY_1)
}
diaSfRd2.setOnClickListener {
diaSfRd1.isChecked = false
diaSfRd3.isChecked = false
diaSfTextLin.isVisible = false
sourceType = TYPE_SOURCE_SYNC_WAY_2
context.modulePrefs.putInt(SOURCE_SYNC_WAY, TYPE_SOURCE_SYNC_WAY_2)
}
diaSfRd3.setOnClickListener {
diaSfRd1.isChecked = false
diaSfRd2.isChecked = false
diaSfTextLin.isVisible = true
sourceType = TYPE_SOURCE_SYNC_WAY_3
context.modulePrefs.putInt(SOURCE_SYNC_WAY, TYPE_SOURCE_SYNC_WAY_3)
}
}
confirmButton { sync(context, it) }
confirmButton {
sync(context) {
context.modulePrefs.putInt(SOURCE_SYNC_WAY, sourceType)
it()
}
}
cancelButton()
neutralButton(text = "自定义规则") {
context.showDialog {