mirror of
https://github.com/gedoor/legado.git
synced 2024-07-19 01:17:25 +08:00
优化
This commit is contained in:
parent
46087e8fb3
commit
297cc92c59
@ -141,6 +141,8 @@ class ImportRssSourceDialog() : BaseDialogFragment(R.layout.dialog_recycler_view
|
||||
AppConfig.importKeepName
|
||||
binding.toolBar.menu.findItem(R.id.menu_keep_group)?.isChecked =
|
||||
AppConfig.importKeepGroup
|
||||
binding.toolBar.menu.findItem(R.id.menu_keep_enable)?.isChecked =
|
||||
AppConfig.importKeepEnable
|
||||
binding.toolBar.menu.findItem(R.id.menu_select_new_source)?.isVisible = false
|
||||
binding.toolBar.menu.findItem(R.id.menu_select_update_source)?.isVisible = false
|
||||
}
|
||||
@ -158,6 +160,11 @@ class ImportRssSourceDialog() : BaseDialogFragment(R.layout.dialog_recycler_view
|
||||
item.isChecked = !item.isChecked
|
||||
putPrefBoolean(PreferKey.importKeepGroup, item.isChecked)
|
||||
}
|
||||
|
||||
R.id.menu_keep_enable -> {
|
||||
item.isChecked = !item.isChecked
|
||||
AppConfig.importKeepEnable = item.isChecked
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ class ImportRssSourceViewModel(app: Application) : BaseViewModel(app) {
|
||||
val group = groupName?.trim()
|
||||
val keepName = AppConfig.importKeepName
|
||||
val keepGroup = AppConfig.importKeepGroup
|
||||
val keepEnable = AppConfig.importKeepEnable
|
||||
val selectSource = arrayListOf<RssSource>()
|
||||
selectStatus.forEachIndexed { index, b ->
|
||||
if (b) {
|
||||
@ -72,6 +73,9 @@ class ImportRssSourceViewModel(app: Application) : BaseViewModel(app) {
|
||||
if (keepGroup) {
|
||||
source.sourceGroup = it.sourceGroup
|
||||
}
|
||||
if (keepEnable) {
|
||||
source.enabled = it.enabled
|
||||
}
|
||||
source.customOrder = it.customOrder
|
||||
}
|
||||
if (!group.isNullOrEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user