Settings Tab: When settings change, make proper updates
This commit is contained in:
parent
7e40d7d887
commit
6ca0cd73b9
2 changed files with 6 additions and 1 deletions
|
@ -67,6 +67,7 @@ import { EditState } from '../../components/ProfileEditor';
|
|||
import { SmartToastManager } from './ToastManager';
|
||||
import { useToastActions } from '../ducks/toast';
|
||||
import { DataReader } from '../../sql/Client';
|
||||
import { deleteAllMyStories } from '../../util/deleteAllMyStories';
|
||||
|
||||
import type { StorageAccessType, ZoomFactorType } from '../../types/Storage';
|
||||
import type { ThemeType } from '../../util/preload';
|
||||
|
@ -551,10 +552,13 @@ export function SmartPreferences(): JSX.Element | null {
|
|||
const [hasStoriesDisabled, onHasStoriesDisabledChanged] = createItemsAccess(
|
||||
'hasStoriesDisabled',
|
||||
false,
|
||||
value => {
|
||||
async value => {
|
||||
const account = window.ConversationController.getOurConversationOrThrow();
|
||||
account.captureChange('hasStoriesDisabled');
|
||||
window.textsecure.server?.onHasStoriesDisabledChange(value);
|
||||
if (!value) {
|
||||
await deleteAllMyStories();
|
||||
}
|
||||
}
|
||||
);
|
||||
const [hasTextFormatting, onTextFormattingChange] = createItemsAccess(
|
||||
|
|
|
@ -191,6 +191,7 @@ export function createIPCEvents(
|
|||
},
|
||||
setLocaleOverride: async (value: string | null) => {
|
||||
await setEphemeralSetting('localeOverride', value);
|
||||
window.SignalContext.restartApp();
|
||||
},
|
||||
getContentProtection: async () => {
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue