pull/1738/head
kunfei 3 years ago
parent e9de5eb857
commit 3123cdc142
  1. 6
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -172,6 +172,9 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
}
}
/**
* 换源
*/
fun changeTo(source: BookSource, book: Book) {
changeSourceCoroutine?.cancel()
changeSourceCoroutine = execute {
@ -218,6 +221,9 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
}
}
/**
* 自动换源
*/
private fun autoChangeSource(name: String, author: String) {
if (!AppConfig.autoChangeSource) return
execute {

Loading…
Cancel
Save