Merge remote-tracking branch 'origin/master'

pull/2361/head
kunfei 2 years ago
commit fa1e43f797
  1. BIN
      app/cronetlib/cronet_api.jar
  2. BIN
      app/cronetlib/cronet_impl_common_java.jar
  3. 2
      app/src/main/assets/cronet.json
  4. 1
      app/src/main/assets/updateLog.md
  5. 2
      app/src/main/java/io/legado/app/constant/EventBus.kt
  6. 2
      app/src/main/java/io/legado/app/ui/association/ImportOnLineBookFileViewModel.kt
  7. 2
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  8. 5
      app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt
  9. 2
      gradle.properties

Binary file not shown.

@ -1 +1 @@
{"x86_64":"74ea18a90451c8e224c8681d882b7e50","armeabi-v7a":"bf5207a8e5468058c448876d46394e2c","arm64-v8a":"580ab3f059d60f3223a83f51bf845dfd","x86":"381ed72dbb89c613428e1ebb09870318","version":"106.0.5249.65"}
{"x86_64":"c27a3027ec4c8eba8ba5a2aab547eb04","armeabi-v7a":"b3e0bccf799324ea4177c9e1752b02f1","arm64-v8a":"8cfa3bfe215024cf486d1cffeed87241","x86":"461acafc8701b6b74f8a6b2c024d434e","version":"106.0.5249.79"}

@ -13,6 +13,7 @@
**2022/09/28**
* 更新cronet: 106.0.5249.79
* 更新cronet: 106.0.5249.65
* 正文选择菜单朗读按钮长按可切换朗读选择内容和从选择开始处一直朗读
* 修复某些情况下无法搜索到标题的bug,净化规则较多的可能会降低搜索速度

@ -28,6 +28,6 @@ object EventBus {
const val TIP_COLOR = "tipColor"
const val SOURCE_CHANGED = "sourceChanged"
const val SEARCH_RESULT = "searchResult"
const val BOOK_URL_CHANGED = "bookUrlChanged"
const val FILE_SOURCE_DOWNLOAD_DONE = "fileSourceDownloadDone"
const val updateReadActionBar = "updateReadActionBar"
}

@ -66,7 +66,7 @@ class ImportOnLineBookFileViewModel(app: Application) : BaseViewModel(app) {
fun importOnLineBookFile(url: String, fileName: String, success: () -> Unit) {
execute {
LocalBook.importFileOnLine(url, fileName, bookSource).let {
postEvent(EventBus.BOOK_URL_CHANGED, it.bookUrl)
postEvent(EventBus.FILE_SOURCE_DOWNLOAD_DONE, it.bookUrl)
}
}.onSuccess {
success.invoke()

@ -535,7 +535,7 @@ class BookInfoActivity :
}
override fun observeLiveBus() {
observeEvent<String>(EventBus.BOOK_URL_CHANGED) {
observeEvent<String>(EventBus.FILE_SOURCE_DOWNLOAD_DONE) {
viewModel.changeToLocalBook(it)
}
}

@ -32,7 +32,8 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
var inBookshelf = false
var bookSource: BookSource? = null
private var changeSourceCoroutine: Coroutine<*>? = null
var isImportBookOnLine = false
val isImportBookOnLine: Boolean
get() = (bookSource?.bookSourceType ?: BookType.local) == BookType.file
fun initData(intent: Intent) {
execute {
@ -76,7 +77,6 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
upCoverByRule(book)
bookSource = if (book.isLocalBook()) null else
appDb.bookSourceDao.getBookSource(book.origin)
isImportBookOnLine = (bookSource?.bookSourceType ?: BookType.local) == BookType.file
if (book.tocUrl.isEmpty()) {
loadBookInfo(book)
} else if (isImportBookOnLine) {
@ -306,7 +306,6 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
fun changeToLocalBook(bookUrl: String) {
appDb.bookDao.getBook(bookUrl)?.let { localBook ->
isImportBookOnLine = false
inBookshelf = true
LocalBook.mergeBook(localBook, bookData.value).let {
bookData.postValue(it)

@ -27,6 +27,6 @@ android.experimental.enableNewResourceShrinker.preciseShrinking=true
# and none from the library's dependencies, thereby reducing the size of the R class for that library.
android.nonTransitiveRClass=true
#https://chromiumdash.appspot.com/releases?platform=Android
CronetVersion=106.0.5249.65
CronetVersion=106.0.5249.79
android.injected.testOnly=false
Loading…
Cancel
Save