From a5044a3f68c78d7a60a75eb7ac44ade3399fe2dd Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 25 Sep 2019 22:27:09 +0800 Subject: [PATCH] up --- .../legado/app/ui/book/source/manage/BookSourceActivity.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index ca7add879..a71483930 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -165,10 +165,10 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity @SuppressLint("InflateParams") private fun showImportDialog() { - val cacheUrls: MutableList? = ACache - .get(this, "cacheUrls", cacheDir = false) + val aCache = ACache.get(this, cacheDir = false) + val cacheUrls: MutableList? = aCache .getAsString("sourceUrl") - ?.splitNotBlank(";") + ?.splitNotBlank(",") ?.toMutableList() alert(titleResource = R.string.import_book_source_on_line) { var editText: ATEAutoCompleteTextView? = null @@ -185,6 +185,7 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity text?.let { if (cacheUrls?.contains(it) == true) { cacheUrls.add(0, it) + aCache.put("sourceUrl", cacheUrls.joinToString(",")) } } }