mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Add setting for "keep muted chats archived"
This commit is contained in:
@@ -7004,6 +7004,14 @@
|
||||
"messageformat": "For example, :-) will be converted to <emojify>🙂</emojify>",
|
||||
"description": "Description for the auto convert emoji setting"
|
||||
},
|
||||
"icu:Preferences__keep-muted-chats-archived--title": {
|
||||
"messageformat": "Keep muted chats archived",
|
||||
"description": "Title for the setting that prevents muted chats from being unarchived when new messages arrive"
|
||||
},
|
||||
"icu:Preferences__keep-muted-chats-archived--description": {
|
||||
"messageformat": "Muted chats that are archived will remain archived when a new message arrives.",
|
||||
"description": "Description for the setting that prevents muted chats from being unarchived"
|
||||
},
|
||||
"icu:Preferences--advanced": {
|
||||
"messageformat": "Advanced",
|
||||
"description": "Title for advanced settings"
|
||||
|
||||
@@ -323,6 +323,7 @@ export default {
|
||||
hasStoriesDisabled: false,
|
||||
hasTextFormatting: true,
|
||||
hasTypingIndicators: true,
|
||||
hasKeepMutedChatsArchived: false,
|
||||
initialSpellCheckSetting: true,
|
||||
isAutoDownloadUpdatesSupported: true,
|
||||
isAutoLaunchSupported: true,
|
||||
@@ -428,6 +429,7 @@ export default {
|
||||
onIncomingCallNotificationsChange: action(
|
||||
'onIncomingCallNotificationsChange'
|
||||
),
|
||||
onKeepMutedChatsArchivedChange: action('onKeepMutedChatsArchivedChange'),
|
||||
onLocaleChange: action('onLocaleChange'),
|
||||
onLastSyncTimeChange: action('onLastSyncTimeChange'),
|
||||
onMediaCameraPermissionsChange: action('onMediaCameraPermissionsChange'),
|
||||
|
||||
@@ -154,6 +154,7 @@ export type PropsDataType = {
|
||||
hasStoriesDisabled: boolean;
|
||||
hasTextFormatting: boolean;
|
||||
hasTypingIndicators: boolean;
|
||||
hasKeepMutedChatsArchived: boolean;
|
||||
page: SettingsPage;
|
||||
lastSyncTime?: number;
|
||||
notificationContent: NotificationSettingType;
|
||||
@@ -287,6 +288,7 @@ type PropsFunctionType = {
|
||||
onHasStoriesDisabledChanged: SelectChangeHandlerType<boolean>;
|
||||
onHideMenuBarChange: CheckboxChangeHandlerType;
|
||||
onIncomingCallNotificationsChange: CheckboxChangeHandlerType;
|
||||
onKeepMutedChatsArchivedChange: CheckboxChangeHandlerType;
|
||||
onLastSyncTimeChange: (time: number) => unknown;
|
||||
onLocaleChange: (locale: string | null | undefined) => void;
|
||||
onMediaCameraPermissionsChange: CheckboxChangeHandlerType;
|
||||
@@ -413,6 +415,7 @@ export function Preferences({
|
||||
hasStoriesDisabled,
|
||||
hasTextFormatting,
|
||||
hasTypingIndicators,
|
||||
hasKeepMutedChatsArchived,
|
||||
i18n,
|
||||
initialSpellCheckSetting,
|
||||
isAutoDownloadUpdatesSupported,
|
||||
@@ -445,6 +448,7 @@ export function Preferences({
|
||||
onHasStoriesDisabledChanged,
|
||||
onHideMenuBarChange,
|
||||
onIncomingCallNotificationsChange,
|
||||
onKeepMutedChatsArchivedChange,
|
||||
onLastSyncTimeChange,
|
||||
onLocaleChange,
|
||||
onMediaCameraPermissionsChange,
|
||||
@@ -1167,6 +1171,16 @@ export function Preferences({
|
||||
name="autoConvertEmoji"
|
||||
onChange={onAutoConvertEmojiChange}
|
||||
/>
|
||||
<Checkbox
|
||||
checked={hasKeepMutedChatsArchived}
|
||||
description={i18n(
|
||||
'icu:Preferences__keep-muted-chats-archived--description'
|
||||
)}
|
||||
label={i18n('icu:Preferences__keep-muted-chats-archived--title')}
|
||||
moduleClassName="Preferences__checkbox"
|
||||
name="keepMutedChatsArchived"
|
||||
onChange={onKeepMutedChatsArchivedChange}
|
||||
/>
|
||||
<SettingsRow>
|
||||
<Control
|
||||
left={i18n('icu:Preferences__EmojiSkinToneDefaultSetting__Label')}
|
||||
|
||||
@@ -563,6 +563,11 @@ export function SmartPreferences(): JSX.Element | null {
|
||||
'autoConvertEmoji',
|
||||
true
|
||||
);
|
||||
const [hasKeepMutedChatsArchived, onKeepMutedChatsArchivedChange] =
|
||||
createItemsAccess('keepMutedChatsArchived', false, () => {
|
||||
const account = window.ConversationController.getOurConversationOrThrow();
|
||||
account.captureChange('keepMutedChatsArchived');
|
||||
});
|
||||
const [hasAutoDownloadUpdate, onAutoDownloadUpdateChange] = createItemsAccess(
|
||||
'auto-download-update',
|
||||
true
|
||||
@@ -754,6 +759,7 @@ export function SmartPreferences(): JSX.Element | null {
|
||||
hasAutoConvertEmoji={hasAutoConvertEmoji}
|
||||
hasAutoDownloadUpdate={hasAutoDownloadUpdate}
|
||||
hasAutoLaunch={hasAutoLaunch}
|
||||
hasKeepMutedChatsArchived={hasKeepMutedChatsArchived}
|
||||
hasCallNotifications={hasCallNotifications}
|
||||
hasCallRingtoneNotification={hasCallRingtoneNotification}
|
||||
hasContentProtection={hasContentProtection}
|
||||
@@ -810,6 +816,7 @@ export function SmartPreferences(): JSX.Element | null {
|
||||
onHasStoriesDisabledChanged={onHasStoriesDisabledChanged}
|
||||
onHideMenuBarChange={onHideMenuBarChange}
|
||||
onIncomingCallNotificationsChange={onIncomingCallNotificationsChange}
|
||||
onKeepMutedChatsArchivedChange={onKeepMutedChatsArchivedChange}
|
||||
onLastSyncTimeChange={onLastSyncTimeChange}
|
||||
onLocaleChange={onLocaleChange}
|
||||
onMediaCameraPermissionsChange={onMediaCameraPermissionsChange}
|
||||
|
||||
Reference in New Issue
Block a user