Files
discord-decomp/modules/notifications/native/playInAppMessageSound.tsx
T
2026-11-01 12:12:55 +02:00

18 lines
748 B
TypeScript

// Metro module 10269 (f10270).
import NotificationSettingsStore from "../../../stores/NotificationSettingsStore";
import { isInAppMessageSoundsEnabled } from "./InAppMessageSoundsStore";
import { InAppNotificationTypes } from "../../../Constants";
import { isMetaQuest } from "../../device/MetaQuestUtils.android";
import { playSound } from "../../sound_playback/SoundUtils";
let c6854_5 = "message1";
let c6854_6 = 0;
export function playInAppMessageSound(a0) {
if (a0.type === InAppNotificationTypes.MESSAGE && isMetaQuest() && isInAppMessageSoundsEnabled() && !NotificationSettingsStore.isSoundDisabled(c6854_5)) {
const r22 = Date.now();
if (!(r22 - c6854_6 < 1000)) {
c6854_6 = r22;
playSound(c6854_5, 0.4);
}
}
}