mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
use settings core
This commit is contained in:
parent
6eed6c5a4a
commit
a86e999e7d
@ -2,28 +2,28 @@ import { Haptics, ImpactStyle } from "@capacitor/haptics"
|
||||
|
||||
export default {
|
||||
selectionStart: async () => {
|
||||
const enabled = window.app.settings.get("haptic_feedback")
|
||||
const enabled = window.app.cores.settings.get("haptic_feedback")
|
||||
|
||||
if (enabled) {
|
||||
await Haptics.selectionStart()
|
||||
}
|
||||
},
|
||||
selectionChanged: async () => {
|
||||
const enabled = window.app.settings.get("haptic_feedback")
|
||||
const enabled = window.app.cores.settings.get("haptic_feedback")
|
||||
|
||||
if (enabled) {
|
||||
await Haptics.selectionChanged()
|
||||
}
|
||||
},
|
||||
selectionEnd: async () => {
|
||||
const enabled = window.app.settings.get("haptic_feedback")
|
||||
const enabled = window.app.cores.settings.get("haptic_feedback")
|
||||
|
||||
if (enabled) {
|
||||
await Haptics.selectionEnd()
|
||||
}
|
||||
},
|
||||
impact: async (style = "Medium") => {
|
||||
const enabled = window.app.settings.get("haptic_feedback")
|
||||
const enabled = window.app.cores.settings.get("haptic_feedback")
|
||||
|
||||
if (enabled) {
|
||||
style = String(style).toTitleCase()
|
||||
|
Loading…
x
Reference in New Issue
Block a user