From 37d0377a1fc8192d0c158b651eb3668e71938617 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 5 Nov 2019 19:50:01 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/service/AudioPlayService.kt | 2 +- app/src/main/java/io/legado/app/service/help/AudioPlay.kt | 2 +- app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/AudioPlayService.kt b/app/src/main/java/io/legado/app/service/AudioPlayService.kt index 3b1c92eec..fb15d022d 100644 --- a/app/src/main/java/io/legado/app/service/AudioPlayService.kt +++ b/app/src/main/java/io/legado/app/service/AudioPlayService.kt @@ -74,7 +74,7 @@ class AudioPlayService : BaseService(), Action.play -> { title = intent.getStringExtra("title") ?: "" subtitle = intent.getStringExtra("subtitle") ?: "" - position = intent.getIntExtra("pageIndex", 0) + position = intent.getIntExtra("position", 0) play(intent.getStringExtra("url")) } Action.pause -> pause(true) 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 48d3f5b15..10d6d6026 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 @@ -13,7 +13,7 @@ object AudioPlay { intent.putExtra("title", title) intent.putExtra("subtitle", subtitle) intent.putExtra("url", url) - intent.putExtra("dataKey", position) + intent.putExtra("position", position) context.startService(intent) } 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 7831eeda2..191c03d1d 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 @@ -19,7 +19,7 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application) var coverData = MutableLiveData() var book: Book? = null var inBookshelf = false - var chapterSize = 0 + private var chapterSize = 0 var callBack: CallBack? = null var durChapterIndex = 0 var durPageIndex = 0