Clarify function of "Delete" option when deleting conversation messages
This commit is contained in:
parent
edd6ed5fab
commit
fcf2c0a3f0
7 changed files with 20 additions and 29 deletions
|
@ -1387,15 +1387,27 @@
|
||||||
},
|
},
|
||||||
"icu:deleteMessages": {
|
"icu:deleteMessages": {
|
||||||
"messageformat": "Delete",
|
"messageformat": "Delete",
|
||||||
"description": "Menu item for deleting messages, title case."
|
"description": "(deleted 2023/10/26) Menu item for deleting messages, title case."
|
||||||
|
},
|
||||||
|
"icu:deleteMessagesInConversation": {
|
||||||
|
"messageformat": "Delete messages",
|
||||||
|
"description": "Menu item for deleting all messages in a conversation from your device"
|
||||||
},
|
},
|
||||||
"icu:ConversationHeader__DeleteMessagesConfirmation__title": {
|
"icu:ConversationHeader__DeleteMessagesConfirmation__title": {
|
||||||
"messageformat": "Delete chat?",
|
"messageformat": "Delete chat?",
|
||||||
"description": "Conversation Header > Delete Action > Delete Messages Confirmation Modal > Title"
|
"description": "(deleted 2023/10/26) Conversation Header > Delete Action > Delete Messages Confirmation Modal > Title"
|
||||||
|
},
|
||||||
|
"icu:ConversationHeader__DeleteMessagesInConversationConfirmation__title": {
|
||||||
|
"messageformat": "Delete messages?",
|
||||||
|
"description": "Title for confirmation modal to delete all messages in a conversation"
|
||||||
},
|
},
|
||||||
"icu:ConversationHeader__DeleteMessagesConfirmation__description": {
|
"icu:ConversationHeader__DeleteMessagesConfirmation__description": {
|
||||||
"messageformat": "This chat will be deleted from this device.",
|
"messageformat": "This chat will be deleted from this device.",
|
||||||
"description": "Conversation Header > Delete Action > Delete Messages Confirmation Modal > Description"
|
"description": "(deleted 2023/10/26) Conversation Header > Delete Action > Delete Messages Confirmation Modal > Description"
|
||||||
|
},
|
||||||
|
"icu:ConversationHeader__DeleteMessagesInConversationConfirmation__description": {
|
||||||
|
"messageformat": "Messages in this chat will be deleted from this device. You can still search for this chat after you delete messages.",
|
||||||
|
"description": "Description for confirmation modal to delete all messages in a conversation"
|
||||||
},
|
},
|
||||||
"icu:ConversationHeader__ContextMenu__LeaveGroupAction__title": {
|
"icu:ConversationHeader__ContextMenu__LeaveGroupAction__title": {
|
||||||
"messageformat": "Leave group",
|
"messageformat": "Leave group",
|
||||||
|
|
|
@ -424,7 +424,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
||||||
this.setState({ hasDeleteMessagesConfirmation: true })
|
this.setState({ hasDeleteMessagesConfirmation: true })
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{i18n('icu:deleteMessages')}
|
{i18n('icu:deleteMessagesInConversation')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
);
|
);
|
||||||
|
@ -553,7 +553,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => this.setState({ hasDeleteMessagesConfirmation: true })}
|
onClick={() => this.setState({ hasDeleteMessagesConfirmation: true })}
|
||||||
>
|
>
|
||||||
{i18n('icu:deleteMessages')}
|
{i18n('icu:deleteMessagesInConversation')}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{isGroup && (
|
{isGroup && (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
@ -589,7 +589,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
||||||
<ConfirmationDialog
|
<ConfirmationDialog
|
||||||
dialogName="ConversationHeader.destroyMessages"
|
dialogName="ConversationHeader.destroyMessages"
|
||||||
title={i18n(
|
title={i18n(
|
||||||
'icu:ConversationHeader__DeleteMessagesConfirmation__title'
|
'icu:ConversationHeader__DeleteMessagesInConversationConfirmation__title'
|
||||||
)}
|
)}
|
||||||
actions={[
|
actions={[
|
||||||
{
|
{
|
||||||
|
@ -607,7 +607,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{i18n(
|
{i18n(
|
||||||
'icu:ConversationHeader__DeleteMessagesConfirmation__description'
|
'icu:ConversationHeader__DeleteMessagesInConversationConfirmation__description'
|
||||||
)}
|
)}
|
||||||
</ConfirmationDialog>
|
</ConfirmationDialog>
|
||||||
);
|
);
|
||||||
|
|
1
ts/model-types.d.ts
vendored
1
ts/model-types.d.ts
vendored
|
@ -310,7 +310,6 @@ export type ConversationAttributesType = {
|
||||||
draftBodyRanges?: DraftBodyRanges;
|
draftBodyRanges?: DraftBodyRanges;
|
||||||
draftTimestamp?: number | null;
|
draftTimestamp?: number | null;
|
||||||
hideStory?: boolean;
|
hideStory?: boolean;
|
||||||
hiddenFromConversationSearch?: boolean;
|
|
||||||
inbox_position?: number;
|
inbox_position?: number;
|
||||||
// When contact is removed - it is initially placed into `justNotification`
|
// When contact is removed - it is initially placed into `justNotification`
|
||||||
// removal stage. In this stage user can still send messages (which will
|
// removal stage. In this stage user can still send messages (which will
|
||||||
|
|
|
@ -371,8 +371,6 @@ export class ConversationModel extends window.Backbone
|
||||||
this.unset('tokens');
|
this.unset('tokens');
|
||||||
|
|
||||||
this.on('change:members change:membersV2', this.fetchContacts);
|
this.on('change:members change:membersV2', this.fetchContacts);
|
||||||
this.on('change:isArchived', this.onArchiveChange);
|
|
||||||
|
|
||||||
this.typingRefreshTimer = null;
|
this.typingRefreshTimer = null;
|
||||||
this.typingPauseTimer = null;
|
this.typingPauseTimer = null;
|
||||||
|
|
||||||
|
@ -4141,17 +4139,6 @@ export class ConversationModel extends window.Backbone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private onArchiveChange() {
|
|
||||||
const isArchived = this.get('isArchived');
|
|
||||||
if (isArchived) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!this.get('hiddenFromConversationSearch')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.set('hiddenFromConversationSearch', false);
|
|
||||||
}
|
|
||||||
|
|
||||||
setMarkedUnread(markedUnread: boolean): void {
|
setMarkedUnread(markedUnread: boolean): void {
|
||||||
const previousMarkedUnread = this.get('markedUnread');
|
const previousMarkedUnread = this.get('markedUnread');
|
||||||
|
|
||||||
|
@ -4855,9 +4842,6 @@ export class ConversationModel extends window.Backbone
|
||||||
active_at: null,
|
active_at: null,
|
||||||
pendingUniversalTimer: undefined,
|
pendingUniversalTimer: undefined,
|
||||||
});
|
});
|
||||||
if (isGroup(this.attributes)) {
|
|
||||||
this.set('hiddenFromConversationSearch', true);
|
|
||||||
}
|
|
||||||
window.Signal.Data.updateConversation(this.attributes);
|
window.Signal.Data.updateConversation(this.attributes);
|
||||||
|
|
||||||
await window.Signal.Data.removeAllMessagesInConversation(this.id, {
|
await window.Signal.Data.removeAllMessagesInConversation(this.id, {
|
||||||
|
|
|
@ -250,7 +250,6 @@ export type ConversationType = ReadonlyDeep<
|
||||||
customColorId?: string;
|
customColorId?: string;
|
||||||
discoveredUnregisteredAt?: number;
|
discoveredUnregisteredAt?: number;
|
||||||
hideStory?: boolean;
|
hideStory?: boolean;
|
||||||
hiddenFromConversationSearch?: boolean;
|
|
||||||
isArchived?: boolean;
|
isArchived?: boolean;
|
||||||
isBlocked?: boolean;
|
isBlocked?: boolean;
|
||||||
removalStage?: 'justNotification' | 'messageRequest';
|
removalStage?: 'justNotification' | 'messageRequest';
|
||||||
|
|
|
@ -106,7 +106,7 @@ function searchConversations(
|
||||||
const phoneNumber = parseAndFormatPhoneNumber(searchTerm, regionCode);
|
const phoneNumber = parseAndFormatPhoneNumber(searchTerm, regionCode);
|
||||||
|
|
||||||
const currentConversations = conversations.filter(conversation => {
|
const currentConversations = conversations.filter(conversation => {
|
||||||
return !conversation.left && !conversation.hiddenFromConversationSearch;
|
return !conversation.left;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Escape the search term
|
// Escape the search term
|
||||||
|
|
|
@ -177,9 +177,6 @@ export function getConversation(model: ConversationModel): ConversationType {
|
||||||
groupId: attributes.groupId,
|
groupId: attributes.groupId,
|
||||||
groupLink: buildGroupLink(attributes),
|
groupLink: buildGroupLink(attributes),
|
||||||
hideStory: Boolean(attributes.hideStory),
|
hideStory: Boolean(attributes.hideStory),
|
||||||
hiddenFromConversationSearch: Boolean(
|
|
||||||
attributes.hiddenFromConversationSearch
|
|
||||||
),
|
|
||||||
inboxPosition,
|
inboxPosition,
|
||||||
isArchived: attributes.isArchived,
|
isArchived: attributes.isArchived,
|
||||||
isBlocked: isBlocked(attributes),
|
isBlocked: isBlocked(attributes),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue