feat: 优化代码

pull/165/head
kunfei 5 years ago
parent 93de67f4ff
commit bfbbbee010
  1. 2
      app/src/main/java/io/legado/app/service/help/ReadBook.kt
  2. 1
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt

@ -33,7 +33,7 @@ object ReadBook {
var curTextChapter: TextChapter? = null var curTextChapter: TextChapter? = null
var nextTextChapter: TextChapter? = null var nextTextChapter: TextChapter? = null
var webBook: WebBook? = null var webBook: WebBook? = null
private var msg: String? = null var msg: String? = null
private val loadingChapters = arrayListOf<Int>() private val loadingChapters = arrayListOf<Int>()
fun resetData(book: Book, noSource: (name: String, author: String) -> Unit) { fun resetData(book: Book, noSource: (name: String, author: String) -> Unit) {

@ -682,6 +682,7 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
mHandler.removeCallbacks(keepScreenRunnable) mHandler.removeCallbacks(keepScreenRunnable)
textActionMenu?.dismiss() textActionMenu?.dismiss()
page_view.onDestroy() page_view.onDestroy()
ReadBook.msg = null
if (!BuildConfig.DEBUG) { if (!BuildConfig.DEBUG) {
SyncBookProgress.uploadBookProgress() SyncBookProgress.uploadBookProgress()
Backup.autoBack(this) Backup.autoBack(this)

Loading…
Cancel
Save