mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 12:47:39 +00:00
Clarify behavior of group deletion
This commit is contained in:
@@ -407,6 +407,8 @@ export class ConversationModel extends window.Backbone
|
||||
this.unset('tokens');
|
||||
|
||||
this.on('change:members change:membersV2', this.fetchContacts);
|
||||
this.on('change:active_at', this.onActiveAtChange);
|
||||
|
||||
this.typingRefreshTimer = null;
|
||||
this.typingPauseTimer = null;
|
||||
|
||||
@@ -4416,6 +4418,12 @@ export class ConversationModel extends window.Backbone
|
||||
}
|
||||
}
|
||||
|
||||
private onActiveAtChange(): void {
|
||||
if (this.get('active_at') && this.get('hiddenFromConversationSearch')) {
|
||||
this.set('hiddenFromConversationSearch', false);
|
||||
}
|
||||
}
|
||||
|
||||
async refreshGroupLink(): Promise<void> {
|
||||
if (!isGroupV2(this.attributes)) {
|
||||
return;
|
||||
@@ -4846,7 +4854,12 @@ export class ConversationModel extends window.Backbone
|
||||
ourAci
|
||||
);
|
||||
const sharedGroups = ourGroups
|
||||
.filter(c => c.hasMember(ourAci) && c.hasMember(theirAci))
|
||||
.filter(
|
||||
c =>
|
||||
c.hasMember(ourAci) &&
|
||||
c.hasMember(theirAci) &&
|
||||
!c.attributes.hiddenFromConversationSearch
|
||||
)
|
||||
.sort(
|
||||
(left, right) =>
|
||||
(right.get('timestamp') || 0) - (left.get('timestamp') || 0)
|
||||
@@ -5209,6 +5222,9 @@ export class ConversationModel extends window.Backbone
|
||||
active_at: null,
|
||||
pendingUniversalTimer: undefined,
|
||||
});
|
||||
if (isGroup(this.attributes)) {
|
||||
this.set('hiddenFromConversationSearch', true);
|
||||
}
|
||||
await DataWriter.updateConversation(this.attributes);
|
||||
|
||||
const ourConversation =
|
||||
|
||||
Reference in New Issue
Block a user