pull/35/head
kunfei 5 years ago
parent 6d65581607
commit a5044a3f68
  1. 7
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt

@ -165,10 +165,10 @@ class BookSourceActivity : VMBaseActivity<BookSourceViewModel>(R.layout.activity
@SuppressLint("InflateParams") @SuppressLint("InflateParams")
private fun showImportDialog() { private fun showImportDialog() {
val cacheUrls: MutableList<String>? = ACache val aCache = ACache.get(this, cacheDir = false)
.get(this, "cacheUrls", cacheDir = false) val cacheUrls: MutableList<String>? = aCache
.getAsString("sourceUrl") .getAsString("sourceUrl")
?.splitNotBlank(";") ?.splitNotBlank(",")
?.toMutableList() ?.toMutableList()
alert(titleResource = R.string.import_book_source_on_line) { alert(titleResource = R.string.import_book_source_on_line) {
var editText: ATEAutoCompleteTextView? = null var editText: ATEAutoCompleteTextView? = null
@ -185,6 +185,7 @@ class BookSourceActivity : VMBaseActivity<BookSourceViewModel>(R.layout.activity
text?.let { text?.let {
if (cacheUrls?.contains(it) == true) { if (cacheUrls?.contains(it) == true) {
cacheUrls.add(0, it) cacheUrls.add(0, it)
aCache.put("sourceUrl", cacheUrls.joinToString(","))
} }
} }
} }

Loading…
Cancel
Save