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