From f265242c6fc8576950f1be2faf0dcdbce2eb2268 Mon Sep 17 00:00:00 2001 From: Kristina Date: Thu, 12 Dec 2024 15:31:26 +0400 Subject: [PATCH] Fix chat red dots (#7440) Signed-off-by: Kristina Fefelova --- .../chunter-resources/src/channelDataProvider.ts | 3 ++- .../components/ReverseChannelScrollView.svelte | 16 +++------------- plugins/chunter-resources/src/scroll.ts | 6 +++--- plugins/chunter-resources/src/utils.ts | 8 +++++--- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/plugins/chunter-resources/src/channelDataProvider.ts b/plugins/chunter-resources/src/channelDataProvider.ts index 31fc5c95fc..47ae48ca5f 100644 --- a/plugins/chunter-resources/src/channelDataProvider.ts +++ b/plugins/chunter-resources/src/channelDataProvider.ts @@ -216,7 +216,8 @@ export class ChannelDataProvider implements IChannelDataProvider { } async updateNewTimestamp (context?: DocNotifyContext): Promise { - this.context = context ?? this.context + if (context === undefined) return + this.context = context const firstNewMsgIndex = await this.getFirstNewMsgIndex() const metadata = get(this.metadataStore) this.newTimestampStore.set(firstNewMsgIndex !== undefined ? metadata[firstNewMsgIndex]?.createdOn : undefined) diff --git a/plugins/chunter-resources/src/components/ReverseChannelScrollView.svelte b/plugins/chunter-resources/src/components/ReverseChannelScrollView.svelte index 9863ceee4d..89908ba69e 100644 --- a/plugins/chunter-resources/src/components/ReverseChannelScrollView.svelte +++ b/plugins/chunter-resources/src/components/ReverseChannelScrollView.svelte @@ -13,17 +13,7 @@ // limitations under the License. -->