Officially support the system tray on Windows

This commit is contained in:
Evan Hahn 2021-06-29 12:18:03 -05:00 committed by GitHub
parent 23acbf284e
commit af1f2ea449
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 968 additions and 194 deletions

View file

@ -55,6 +55,10 @@ import { ReadReceipts } from './messageModifiers/ReadReceipts';
import { ReadSyncs } from './messageModifiers/ReadSyncs';
import { ViewSyncs } from './messageModifiers/ViewSyncs';
import * as AttachmentDownloads from './messageModifiers/AttachmentDownloads';
import {
SystemTraySetting,
parseSystemTraySetting,
} from './types/SystemTraySetting';
const MAX_ATTACHMENT_DOWNLOAD_AGE = 3600 * 72 * 1000;
@ -464,6 +468,12 @@ export async function startApp(): Promise<void> {
window.setAutoHideMenuBar(value);
window.setMenuBarVisibility(!value);
},
getSystemTraySetting: (): SystemTraySetting =>
parseSystemTraySetting(window.storage.get('system-tray-setting')),
setSystemTraySetting: (value: Readonly<SystemTraySetting>) => {
window.storage.put('system-tray-setting', value);
window.updateSystemTraySetting(value);
},
getNotificationSetting: () =>
window.storage.get('notification-setting', 'message'),