Adds a pop and whoosh sound for message receive/sent

This commit is contained in:
Josh Perez
2023-05-08 15:59:36 -04:00
parent c7a430f375
commit 272b81c7cf
20 changed files with 141 additions and 145 deletions

View File

@@ -8,27 +8,6 @@ import { isProduction } from '../util/version';
const MIN_WINDOWS_VERSION = '8.0.0';
export enum AudioNotificationSupport {
None,
Native,
Custom,
}
export function getAudioNotificationSupport(
OS: OSType
): AudioNotificationSupport {
if (OS.isWindows(MIN_WINDOWS_VERSION) || OS.isMacOS()) {
return AudioNotificationSupport.Native;
}
if (OS.isLinux()) {
return AudioNotificationSupport.Custom;
}
return AudioNotificationSupport.None;
}
export const isAudioNotificationSupported = (OS: OSType): boolean =>
getAudioNotificationSupport(OS) !== AudioNotificationSupport.None;
// Using `Notification::tag` has a bug on Windows 7:
// https://github.com/electron/electron/issues/11189
export const isNotificationGroupingSupported = (OS: OSType): boolean =>

View File

@@ -62,6 +62,7 @@ export type StorageAccessType = {
'spell-check': boolean;
'system-tray-setting': SystemTraySetting;
'theme-setting': ThemeSettingType;
audioMessage: boolean;
attachmentMigration_isComplete: boolean;
attachmentMigration_lastProcessedIndex: number;
blocked: ReadonlyArray<string>;