Update header actions/add hiddenFromConversationSearch
This commit is contained in:
parent
00250e535c
commit
af4ad55c68
11 changed files with 204 additions and 27 deletions
|
@ -361,6 +361,7 @@ export class ConversationModel extends window.Backbone
|
|||
this.unset('tokens');
|
||||
|
||||
this.on('change:members change:membersV2', this.fetchContacts);
|
||||
this.on('change:isArchived', this.onArchiveChange);
|
||||
|
||||
this.typingRefreshTimer = null;
|
||||
this.typingPauseTimer = null;
|
||||
|
@ -4196,6 +4197,17 @@ 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 {
|
||||
const previousMarkedUnread = this.get('markedUnread');
|
||||
|
||||
|
@ -4892,6 +4904,9 @@ export class ConversationModel extends window.Backbone
|
|||
active_at: null,
|
||||
pendingUniversalTimer: undefined,
|
||||
});
|
||||
if (isGroup(this.attributes)) {
|
||||
this.set('hiddenFromConversationSearch', true);
|
||||
}
|
||||
window.Signal.Data.updateConversation(this.attributes);
|
||||
|
||||
await window.Signal.Data.removeAllMessagesInConversation(this.id, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue