Change ephemeral settings to only persist in ephemeralConfig
This commit is contained in:
parent
07e2fb7f60
commit
73e8bec42f
18 changed files with 295 additions and 265 deletions
|
@ -5,11 +5,10 @@ import { ipcRenderer } from 'electron';
|
|||
import type { MenuItemConstructorOptions } from 'electron';
|
||||
|
||||
import type { MenuOptionsType } from '../types/menu';
|
||||
import type { IPCEventsValuesType } from '../util/createIPCEvents';
|
||||
import type { LocalizerType } from '../types/Util';
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
import type { NativeThemeType } from '../context/createNativeThemeListener';
|
||||
import type { SettingType } from '../util/preload';
|
||||
import type { SettingType, SettingsValuesType } from '../util/preload';
|
||||
import type { RendererConfigType } from '../types/RendererConfig';
|
||||
|
||||
import { Bytes } from '../context/Bytes';
|
||||
|
@ -58,7 +57,7 @@ export type MinimalSignalContextType = {
|
|||
nativeThemeListener: NativeThemeType;
|
||||
restartApp: () => void;
|
||||
Settings: {
|
||||
themeSetting: SettingType<IPCEventsValuesType['themeSetting']>;
|
||||
themeSetting: SettingType<SettingsValuesType['themeSetting']>;
|
||||
waitForChange: () => Promise<void>;
|
||||
};
|
||||
OS: {
|
||||
|
|
|
@ -127,11 +127,6 @@ const IPC: IPCType = {
|
|||
titleBarDoubleClick: () => {
|
||||
ipc.send('title-bar-double-click');
|
||||
},
|
||||
updateSystemTraySetting: (
|
||||
systemTraySetting /* : Readonly<SystemTraySetting> */
|
||||
) => {
|
||||
void ipc.invoke('update-system-tray-setting', systemTraySetting);
|
||||
},
|
||||
updateTrayIcon: unreadCount => ipc.send('update-tray-icon', unreadCount),
|
||||
};
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import { initMessageCleanup } from '../../services/messageStateCleanup';
|
|||
import { initializeMessageCounter } from '../../util/incrementMessageCounter';
|
||||
import { initializeRedux } from '../../state/initializeRedux';
|
||||
import * as Stickers from '../../types/Stickers';
|
||||
import { ThemeType } from '../../types/Util';
|
||||
|
||||
window.assert = assert;
|
||||
|
||||
|
@ -51,6 +52,7 @@ window.testUtilities = {
|
|||
},
|
||||
stories: [],
|
||||
storyDistributionLists: [],
|
||||
theme: ThemeType.dark,
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
// Copyright 2017 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { installCallback, installSetting } from '../util/preload';
|
||||
import {
|
||||
installCallback,
|
||||
installSetting,
|
||||
installEphemeralSetting,
|
||||
} from '../util/preload';
|
||||
|
||||
// ChatColorPicker redux hookups
|
||||
installCallback('getCustomColors');
|
||||
|
@ -48,14 +52,10 @@ installSetting('hasStoriesDisabled');
|
|||
installSetting('hideMenuBar');
|
||||
installSetting('incomingCallNotification');
|
||||
installSetting('lastSyncTime');
|
||||
installSetting('localeOverride');
|
||||
installSetting('notificationDrawAttention');
|
||||
installSetting('notificationSetting');
|
||||
installSetting('spellCheck');
|
||||
installSetting('systemTraySetting');
|
||||
installSetting('sentMediaQualitySetting');
|
||||
installSetting('textFormatting');
|
||||
installSetting('themeSetting');
|
||||
installSetting('universalExpireTimer');
|
||||
installSetting('zoomFactor');
|
||||
installSetting('phoneNumberDiscoverabilitySetting');
|
||||
|
@ -66,3 +66,8 @@ installCallback('getAvailableIODevices');
|
|||
installSetting('preferredAudioInputDevice');
|
||||
installSetting('preferredAudioOutputDevice');
|
||||
installSetting('preferredVideoInputDevice');
|
||||
|
||||
installEphemeralSetting('themeSetting');
|
||||
installEphemeralSetting('systemTraySetting');
|
||||
installEphemeralSetting('localeOverride');
|
||||
installEphemeralSetting('spellCheck');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue