Delete sent stories when you turn off stories
This commit is contained in:
parent
622f61903b
commit
3e57899006
6 changed files with 32 additions and 2 deletions
|
@ -39,6 +39,7 @@ installSetting('typingIndicatorSetting', {
|
|||
setter: false,
|
||||
});
|
||||
|
||||
installCallback('deleteAllMyStories');
|
||||
installCallback('isPhoneNumberSharingEnabled');
|
||||
installCallback('isPrimary');
|
||||
installCallback('shouldShowStoriesSettings');
|
||||
|
|
|
@ -88,6 +88,7 @@ const ipcPNP = createCallback('isPhoneNumberSharingEnabled');
|
|||
const ipcShouldShowStoriesSettings = createCallback(
|
||||
'shouldShowStoriesSettings'
|
||||
);
|
||||
const ipcDeleteAllMyStories = createCallback('deleteAllMyStories');
|
||||
|
||||
// ChatColorPicker redux hookups
|
||||
// The redux actions update over IPC through a preferences re-render
|
||||
|
@ -301,7 +302,13 @@ const renderPreferences = async () => {
|
|||
onCountMutedConversationsChange: reRender(
|
||||
settingCountMutedConversations.setValue
|
||||
),
|
||||
onHasStoriesDisabledChanged: reRender(settingHasStoriesDisabled.setValue),
|
||||
onHasStoriesDisabledChanged: reRender(async (value: boolean) => {
|
||||
await settingHasStoriesDisabled.setValue(value);
|
||||
if (!value) {
|
||||
ipcDeleteAllMyStories();
|
||||
}
|
||||
return value;
|
||||
}),
|
||||
onHideMenuBarChange: reRender(settingHideMenuBar.setValue),
|
||||
onIncomingCallNotificationsChange: reRender(
|
||||
settingIncomingCallNotification.setValue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue