mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-08 21:08:43 +02:00
Move AbsAudioPlayer.setChapterTrack to AudioPlayer instead of localStore
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
import { Preferences } from '@capacitor/preferences'
|
||||
import { AbsAudioPlayer } from '@/plugins/capacitor'
|
||||
import { Capacitor } from '@capacitor/core'
|
||||
|
||||
|
||||
class LocalStorage {
|
||||
constructor(vuexStore) {
|
||||
@@ -48,9 +45,6 @@ class LocalStorage {
|
||||
async setUseChapterTrack(useChapterTrack) {
|
||||
try {
|
||||
await Preferences.set({ key: 'useChapterTrack', value: useChapterTrack ? '1' : '0' })
|
||||
if (Capacitor.getPlatform() === 'ios') {
|
||||
AbsAudioPlayer.setChapterTrack({ enabled: useChapterTrack })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[LocalStorage] Failed to set use chapter track', error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user