feat: 优化代码

pull/132/head
kunfei 5 years ago
parent d8abfbe364
commit 01b503f464
  1. 3
      app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt
  2. 3
      app/src/main/java/io/legado/app/ui/rss/source/manage/RssSourceActivity.kt

@ -213,7 +213,8 @@ class ReplaceRuleActivity : VMBaseActivity<ReplaceRuleViewModel>(R.layout.activi
customView {
layoutInflater.inflate(R.layout.dialog_edit_text, null).apply {
editText = edit_view
edit_view.setFilterValues(cacheUrls) {
edit_view.setFilterValues(cacheUrls)
edit_view.delCallBack = {
cacheUrls.remove(it)
aCache.put(importRecordKey, cacheUrls.joinToString(","))
}

@ -227,7 +227,8 @@ class RssSourceActivity : VMBaseActivity<RssSourceViewModel>(R.layout.activity_r
customView {
layoutInflater.inflate(R.layout.dialog_edit_text, null).apply {
editText = edit_view
edit_view.setFilterValues(cacheUrls) {
edit_view.setFilterValues(cacheUrls)
edit_view.delCallBack = {
cacheUrls.remove(it)
aCache.put(importRecordKey, cacheUrls.joinToString(","))
}

Loading…
Cancel
Save