mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
7727dc093e
The "Hide menu bar" option is only applicable to Windows and some Linux distros, where the menu bar is attached to the Signal window. Therefore, this commit ensures that it doesn't show up on MacOS. It includes a setting, isHideMenuBarSupported(), to control the option's appearance. This commit also includes the tests to make sure isHideMenuBarSupported() works correctly. Fixes #2705
15 lines
510 B
TypeScript
15 lines
510 B
TypeScript
import * as OS from '../OS';
|
|
|
|
const MIN_WINDOWS_VERSION = '8.0.0';
|
|
|
|
export const isAudioNotificationSupported = () =>
|
|
OS.isWindows(MIN_WINDOWS_VERSION) || OS.isMacOS();
|
|
|
|
// Using `Notification::tag` has a bug on Windows 7:
|
|
// https://github.com/electron/electron/issues/11189
|
|
export const isNotificationGroupingSupported = () =>
|
|
!OS.isWindows() || OS.isWindows(MIN_WINDOWS_VERSION);
|
|
|
|
// the "hide menu bar" option is specific to Windows and Linux
|
|
export const isHideMenuBarSupported = () => !OS.isMacOS();
|