mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-15 16:34:43 +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 { Preferences } from '@capacitor/preferences'
|
||||||
import { AbsAudioPlayer } from '@/plugins/capacitor'
|
import { AbsAudioPlayer } from '@/plugins/capacitor'
|
||||||
|
import { Capacitor } from '@capacitor/core'
|
||||||
|
|
||||||
|
|
||||||
class LocalStorage {
|
class LocalStorage {
|
||||||
|
@ -47,7 +48,7 @@ class LocalStorage {
|
||||||
async setUseChapterTrack(useChapterTrack) {
|
async setUseChapterTrack(useChapterTrack) {
|
||||||
try {
|
try {
|
||||||
await Preferences.set({ key: 'useChapterTrack', value: useChapterTrack ? '1' : '0' })
|
await Preferences.set({ key: 'useChapterTrack', value: useChapterTrack ? '1' : '0' })
|
||||||
if (this.$platform === 'ios') {
|
if (Capacitor.getPlatform() === 'ios') {
|
||||||
AbsAudioPlayer.setChapterTrack({ enabled: useChapterTrack })
|
AbsAudioPlayer.setChapterTrack({ enabled: useChapterTrack })
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue