mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +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 {
|
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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user