Show group names in notifications, and only show the latest

This commit is contained in:
Evan Hahn 2020-09-04 18:07:24 -05:00 committed by Scott Nonnenberg
parent 496a90efbb
commit 91a591c6ca
7 changed files with 161 additions and 364 deletions

View file

@ -1450,11 +1450,7 @@
this.set({ expirationStartTimestamp });
}
Whisper.Notifications.remove(
Whisper.Notifications.where({
messageId: this.id,
})
);
Whisper.Notifications.removeBy({ messageId: this.id });
if (!skipSave) {
await window.Signal.Data.saveMessage(this.attributes, {
@ -2924,10 +2920,7 @@
});
// Remove any notifications for this message
const notificationForMessage = Whisper.Notifications.findWhere({
messageId: this.get('id'),
});
Whisper.Notifications.remove(notificationForMessage);
Whisper.Notifications.removeBy({ messageId: this.get('id') });
// Erase the contents of this message
await this.eraseContents(