mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Sync storiesDisabled flag on AccountRecord
This commit is contained in:
@@ -68,7 +68,7 @@ export type PropsDataType = {
|
||||
hasReadReceipts: boolean;
|
||||
hasRelayCalls?: boolean;
|
||||
hasSpellCheck: boolean;
|
||||
hasStoriesEnabled: boolean;
|
||||
hasStoriesDisabled: boolean;
|
||||
hasTypingIndicators: boolean;
|
||||
lastSyncTime?: number;
|
||||
notificationContent: NotificationSettingType;
|
||||
@@ -133,7 +133,7 @@ type PropsFunctionType = {
|
||||
onCallNotificationsChange: CheckboxChangeHandlerType;
|
||||
onCallRingtoneNotificationChange: CheckboxChangeHandlerType;
|
||||
onCountMutedConversationsChange: CheckboxChangeHandlerType;
|
||||
onHasStoriesEnabledChanged: SelectChangeHandlerType<boolean>;
|
||||
onHasStoriesDisabledChanged: SelectChangeHandlerType<boolean>;
|
||||
onHideMenuBarChange: CheckboxChangeHandlerType;
|
||||
onIncomingCallNotificationsChange: CheckboxChangeHandlerType;
|
||||
onLastSyncTimeChange: (time: number) => unknown;
|
||||
@@ -228,7 +228,7 @@ export const Preferences = ({
|
||||
hasReadReceipts,
|
||||
hasRelayCalls,
|
||||
hasSpellCheck,
|
||||
hasStoriesEnabled,
|
||||
hasStoriesDisabled,
|
||||
hasTypingIndicators,
|
||||
i18n,
|
||||
initialSpellCheckSetting,
|
||||
@@ -251,7 +251,7 @@ export const Preferences = ({
|
||||
onCallNotificationsChange,
|
||||
onCallRingtoneNotificationChange,
|
||||
onCountMutedConversationsChange,
|
||||
onHasStoriesEnabledChanged,
|
||||
onHasStoriesDisabledChanged,
|
||||
onHideMenuBarChange,
|
||||
onIncomingCallNotificationsChange,
|
||||
onLastSyncTimeChange,
|
||||
@@ -977,7 +977,14 @@ export const Preferences = ({
|
||||
</label>
|
||||
}
|
||||
right={
|
||||
hasStoriesEnabled ? (
|
||||
hasStoriesDisabled ? (
|
||||
<Button
|
||||
onClick={() => onHasStoriesDisabledChanged(false)}
|
||||
variant={ButtonVariant.Secondary}
|
||||
>
|
||||
{i18n('Preferences__turn-stories-on')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
className="Preferences__stories-off"
|
||||
onClick={() => setConfirmStoriesOff(true)}
|
||||
@@ -985,13 +992,6 @@ export const Preferences = ({
|
||||
>
|
||||
{i18n('Preferences__turn-stories-off')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
onClick={() => onHasStoriesEnabledChanged(true)}
|
||||
variant={ButtonVariant.Secondary}
|
||||
>
|
||||
{i18n('Preferences__turn-stories-on')}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
/>
|
||||
@@ -1043,7 +1043,7 @@ export const Preferences = ({
|
||||
dialogName="Preference.turnStoriesOff"
|
||||
actions={[
|
||||
{
|
||||
action: () => onHasStoriesEnabledChanged(false),
|
||||
action: () => onHasStoriesDisabledChanged(true),
|
||||
style: 'negative',
|
||||
text: i18n('Preferences__turn-stories-off--action'),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user