mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added haptic feedback for buttons
This commit is contained in:
parent
1f9b51dddb
commit
9f9172f3ec
@ -73,7 +73,7 @@ export default class SoundCore extends Core {
|
||||
async injectUseUIAudio() {
|
||||
const injectOnButtons = (event) => {
|
||||
// search for closest button
|
||||
const button = event.target.closest("button")
|
||||
const button = event.target.closest("button") || event.target.closest(".ant-btn")
|
||||
|
||||
// if button exist and has aria-checked attribute then play switch_on or switch_off
|
||||
if (button) {
|
||||
@ -82,7 +82,7 @@ export default class SoundCore extends Core {
|
||||
}
|
||||
|
||||
if (app.cores.settings.get("haptic_feedback")) {
|
||||
Haptics.impact({ style: ImpactStyle.Medium })
|
||||
Haptics.impact({ style: ImpactStyle.Light })
|
||||
}
|
||||
|
||||
return this.public.useUIAudio("generic_click")
|
||||
|
Loading…
x
Reference in New Issue
Block a user