Officially support the system tray on Linux, in beta only

This commit is contained in:
Evan Hahn 2021-06-29 14:29:40 -05:00 committed by GitHub
parent af1f2ea449
commit 8b30fc17cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 22 deletions

View file

@ -20,7 +20,8 @@ export class SystemTraySettingCache {
constructor(
private readonly sql: Pick<MainSQL, 'sqlCall'>,
private readonly argv: Array<string>
private readonly argv: Array<string>,
private readonly appVersion: string
) {}
async get(): Promise<SystemTraySetting> {
@ -51,7 +52,7 @@ export class SystemTraySettingCache {
log.info(
`getSystemTraySetting saw --use-tray-icon flag. Returning ${result}`
);
} else if (isSystemTraySupported()) {
} else if (isSystemTraySupported(this.appVersion)) {
const { value } = (await this.sql.sqlCall('getItemById', [
'system-tray-setting',
])) || { value: undefined };