Mark all calls read when opening calls tab

This commit is contained in:
Jamie Kyle 2023-08-22 14:01:36 -07:00 committed by GitHub
parent b7c17212c7
commit 344ebf494d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 80 additions and 17 deletions

View file

@ -223,7 +223,7 @@ export class ConversationModel extends window.Backbone
contactCollection?: Backbone.Collection<ConversationModel>;
debouncedUpdateLastMessage?: (() => void) & { flush(): void };
debouncedUpdateLastMessage: (() => void) & { flush(): void };
initialPromise?: Promise<unknown>;
@ -1400,9 +1400,7 @@ export class ConversationModel extends window.Backbone
): Promise<void> {
await this.beforeAddSingleMessage(message);
this.doAddSingleMessage(message, { isJustSent });
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.debouncedUpdateLastMessage!();
this.debouncedUpdateLastMessage();
}
private async beforeAddSingleMessage(message: MessageModel): Promise<void> {
@ -5221,7 +5219,7 @@ export class ConversationModel extends window.Backbone
async flushDebouncedUpdates(): Promise<void> {
try {
await this.debouncedUpdateLastMessage?.flush();
this.debouncedUpdateLastMessage.flush();
} catch (error) {
const logId = this.idForLogging();
log.error(