Init Language Picker

This commit is contained in:
Jamie Kyle 2023-11-06 13:19:23 -08:00 committed by GitHub
parent 754bb02c06
commit 89e66da351
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 610 additions and 61 deletions

View file

@ -61,6 +61,7 @@ export type IPCEventsValuesType = {
hideMenuBar: boolean | undefined;
incomingCallNotification: boolean;
lastSyncTime: number | undefined;
localeOverride: string | null;
notificationDrawAttention: boolean;
notificationSetting: NotificationSettingType;
preferredAudioInputDevice: AudioDevice | undefined;
@ -372,6 +373,12 @@ export function createIPCEvents(
return promise;
},
getLocaleOverride: () => {
return window.storage.get('localeOverride') ?? null;
},
setLocaleOverride: async (locale: string | null) => {
await window.storage.put('localeOverride', locale);
},
getNotificationSetting: () =>
window.storage.get('notification-setting', 'message'),
setNotificationSetting: (value: 'message' | 'name' | 'count' | 'off') =>