use settings core

This commit is contained in:
SrGooglo 2023-02-24 14:38:15 +00:00
parent 6eed6c5a4a
commit a86e999e7d

View File

@ -2,28 +2,28 @@ import { Haptics, ImpactStyle } from "@capacitor/haptics"
export default { export default {
selectionStart: async () => { selectionStart: async () => {
const enabled = window.app.settings.get("haptic_feedback") const enabled = window.app.cores.settings.get("haptic_feedback")
if (enabled) { if (enabled) {
await Haptics.selectionStart() await Haptics.selectionStart()
} }
}, },
selectionChanged: async () => { selectionChanged: async () => {
const enabled = window.app.settings.get("haptic_feedback") const enabled = window.app.cores.settings.get("haptic_feedback")
if (enabled) { if (enabled) {
await Haptics.selectionChanged() await Haptics.selectionChanged()
} }
}, },
selectionEnd: async () => { selectionEnd: async () => {
const enabled = window.app.settings.get("haptic_feedback") const enabled = window.app.cores.settings.get("haptic_feedback")
if (enabled) { if (enabled) {
await Haptics.selectionEnd() await Haptics.selectionEnd()
} }
}, },
impact: async (style = "Medium") => { impact: async (style = "Medium") => {
const enabled = window.app.settings.get("haptic_feedback") const enabled = window.app.cores.settings.get("haptic_feedback")
if (enabled) { if (enabled) {
style = String(style).toTitleCase() style = String(style).toTitleCase()