Never play the notification sound on native platforms (#406)
Co-authored-by: Coracle-Bot <npub1klq6260@nostr.local>
This commit is contained in:
parent
4578644924
commit
f15f3b9c95
1 changed files with 3 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {onMount} from "svelte"
|
import {onMount} from "svelte"
|
||||||
|
import {Capacitor} from "@capacitor/core"
|
||||||
import {notificationSettings} from "@app/settings"
|
import {notificationSettings} from "@app/settings"
|
||||||
import {onNotification} from "@app/push"
|
import {onNotification} from "@app/push"
|
||||||
|
|
||||||
|
|
@ -16,6 +17,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
if (Capacitor.isNativePlatform()) return
|
||||||
|
|
||||||
audioElement.load()
|
audioElement.load()
|
||||||
|
|
||||||
document.addEventListener("visibilitychange", onVisibilityChange)
|
document.addEventListener("visibilitychange", onVisibilityChange)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue