From a7443d0992f9e23f1616866691790ddf009cb0bc Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 18 Jun 2023 14:53:01 -0500 Subject: [PATCH] Fix:Persist Total Track setting in audio player #663 --- components/app/AudioPlayer.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/app/AudioPlayer.vue b/components/app/AudioPlayer.vue index 2cf1bc91..6c21010b 100644 --- a/components/app/AudioPlayer.vue +++ b/components/app/AudioPlayer.vue @@ -695,6 +695,7 @@ export default { this.updateTimestamp() this.updateTrack() this.updateReadyTrack() + this.$localStore.setUseTotalTrack(this.useTotalTrack) this.$localStore.setUseChapterTrack(this.useChapterTrack) } else if (action === 'total_track') { this.useTotalTrack = !this.useTotalTrack @@ -704,6 +705,7 @@ export default { this.updateTrack() this.updateReadyTrack() this.$localStore.setUseTotalTrack(this.useTotalTrack) + this.$localStore.setUseChapterTrack(this.useChapterTrack) } else if (action === 'close') { this.closePlayback() } @@ -792,6 +794,7 @@ export default { }, async init() { this.useChapterTrack = await this.$localStore.getUseChapterTrack() + this.useTotalTrack = await this.$localStore.getUseTotalTrack() this.lockUi = await this.$localStore.getPlayerLock() this.onPlaybackSessionListener = AbsAudioPlayer.addListener('onPlaybackSession', this.onPlaybackSession)