优化
This commit is contained in:
@@ -1082,6 +1082,13 @@ class ReadBookActivity : BaseReadBookActivity(),
|
||||
putExtra("url", it)
|
||||
IntentData.put(it, ReadBook.bookSource?.getHeaderMap(true))
|
||||
}
|
||||
} else if (it.isTrue()) {
|
||||
//购买成功后刷新目录
|
||||
ReadBook.book?.let {
|
||||
ReadBook.curTextChapter = null
|
||||
BookHelp.delContent(book, chapter)
|
||||
viewModel.loadChapterList(book)
|
||||
}
|
||||
}
|
||||
}.onError {
|
||||
AppLog.putDebug(it.localizedMessage)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
package io.legado.app.utils
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.icu.text.Collator
|
||||
import android.icu.util.ULocale
|
||||
import android.net.Uri
|
||||
@@ -84,6 +85,7 @@ fun String.splitNotBlank(regex: Regex, limit: Int = 0): Array<String> = run {
|
||||
this.split(regex, limit).map { it.trim() }.filterNot { it.isBlank() }.toTypedArray()
|
||||
}
|
||||
|
||||
@SuppressLint("ObsoleteSdkInt")
|
||||
fun String.cnCompare(other: String): Int {
|
||||
return if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
|
||||
Collator.getInstance(ULocale.SIMPLIFIED_CHINESE).compare(this, other)
|
||||
|
||||
Reference in New Issue
Block a user