session-desktop/ts/types/Settings.ts
Derek Meer 7727dc093e Hides the "Hide menu bar" option on MacOS (#2903)
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
2019-04-08 10:25:14 -07:00

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();