From 56b85eeb92bad65ad839e866d21e8cf91f96c798 Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 7 Dec 2020 21:59:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/service/help/AudioPlay.kt | 1 - app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt | 3 --- 2 files changed, 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/help/AudioPlay.kt b/app/src/main/java/io/legado/app/service/help/AudioPlay.kt index 435cb460c..2cc3bb267 100644 --- a/app/src/main/java/io/legado/app/service/help/AudioPlay.kt +++ b/app/src/main/java/io/legado/app/service/help/AudioPlay.kt @@ -21,7 +21,6 @@ object AudioPlay { var book: Book? = null var durChapter: BookChapter? = null var inBookshelf = false - var chapterSize = 0 var durChapterIndex = 0 var durChapterPos = 0 var webBook: WebBook? = null diff --git a/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt b/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt index b2c0732d6..d9dd781cd 100644 --- a/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt @@ -51,7 +51,6 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application) } durChapter = App.db.bookChapterDao.getChapter(book.bookUrl, durChapterIndex) upDurChapter(book) - chapterSize = count } } saveRead() @@ -81,7 +80,6 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application) if (cList.isNotEmpty()) { if (changeDruChapterIndex == null) { App.db.bookChapterDao.insert(*cList.toTypedArray()) - AudioPlay.chapterSize = cList.size } else { changeDruChapterIndex(cList) } @@ -132,7 +130,6 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application) book.durChapterTitle = chapters[AudioPlay.durChapterIndex].title App.db.bookDao.update(book) App.db.bookChapterDao.insert(*chapters.toTypedArray()) - AudioPlay.chapterSize = chapters.size } }