@ -36,12 +36,8 @@ object RuleComplete {
fun autoComplete(
rule: String?,
preRule: String? = null,
type: Int = 1,
enable: Boolean
type: Int = 1
): String? {
if (!enable) {
return rule
}
if (rule.isNullOrEmpty() || rule.contains(completeIgnore)
|| preRule?.contains(completeIgnorePreRule) == true
) {
@ -98,7 +98,10 @@ class BookSourceEditViewModel(application: Application) : BaseViewModel(applicat
fun ruleComplete(rule: String?, preRule: String? = null, type: Int = 1): String? {
return RuleComplete.autoComplete(rule, preRule, type, autoComplete)
if (autoComplete) {
return RuleComplete.autoComplete(rule, preRule, type)
@ -78,7 +78,10 @@ class RssSourceEditViewModel(application: Application) : BaseViewModel(applicati