fix: use native haptic plugin and remove semicolons

This commit is contained in:
benonymity 2022-12-08 19:09:46 -05:00
parent 1aa6a441f3
commit acc5bde33a
16 changed files with 65 additions and 87 deletions

View file

@ -45,7 +45,6 @@
<script>
import { Dialog } from '@capacitor/dialog'
import { AbsFileSystem, AbsDownloader } from '@/plugins/capacitor'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default {
props: {
@ -151,7 +150,7 @@ export default {
},
async downloadClick() {
if (this.downloadItem) return
await Haptics.impact({ style: ImpactStyle.Medium });
await this.$hapticsImpactMedium()
if (this.isIos) {
// no local folders on iOS
this.startDownload()
@ -212,7 +211,7 @@ export default {
}
},
async playClick() {
await Haptics.impact({ style: ImpactStyle.Medium });
await this.$hapticsImpactMedium()
if (this.streamIsPlaying) {
this.$eventBus.$emit('pause-item')
} else {
@ -234,7 +233,7 @@ export default {
}
},
async toggleFinished() {
await Haptics.impact({ style: ImpactStyle.Medium });
await this.$hapticsImpactMedium()
this.isProcessingReadUpdate = true
if (this.isLocal || this.localEpisode) {
var isFinished = !this.userIsFinished