fix: broken isIos

This commit is contained in:
benonymity 2023-12-22 21:36:49 -05:00
parent b11ad9dc5b
commit bb656a265f

View file

@ -1,5 +1,6 @@
import { Preferences } from '@capacitor/preferences'
import { AbsAudioPlayer } from '@/plugins/capacitor'
import { Capacitor } from '@capacitor/core'
class LocalStorage {
@ -47,7 +48,7 @@ class LocalStorage {
async setUseChapterTrack(useChapterTrack) {
try {
await Preferences.set({ key: 'useChapterTrack', value: useChapterTrack ? '1' : '0' })
if (this.$platform === 'ios') {
if (Capacitor.getPlatform() === 'ios') {
AbsAudioPlayer.setChapterTrack({ enabled: useChapterTrack })
}
} catch (error) {