mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-15 08:24:50 +02:00
fix: broken isIos
This commit is contained in:
parent
b11ad9dc5b
commit
bb656a265f
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue