diff --git a/communication b/communication index ffed29fc6b..90b0ea297d 160000 --- a/communication +++ b/communication @@ -1 +1 @@ -Subproject commit ffed29fc6bbdf7e7d766ee902f3c5a7089098d5a +Subproject commit 90b0ea297d2c4c2ab3569bff69721beec6809932 diff --git a/desktop/src/ui/notifications.ts b/desktop/src/ui/notifications.ts index 9062ba31be..2d4a988b6f 100644 --- a/desktop/src/ui/notifications.ts +++ b/desktop/src/ui/notifications.ts @@ -134,8 +134,8 @@ export function configureNotifications (): void { const isCommunicationEnabled = getMetadata(communication.metadata.Enabled) ?? false if (isCommunicationEnabled) { - notificationsCountQuery.query({ read: false, limit: 1000 }, res => { - newUnreadNotifications = res.getResult().length + notificationsCountQuery.query({ read: false, limit: 1, strict: true, total: true }, res => { + newUnreadNotifications = res.getTotal() if (preferences.showUnreadCounter) { electronAPI.setBadge(prevUnViewdNotificationsCount + newUnreadNotifications) diff --git a/packages/presentation/src/communication.ts b/packages/presentation/src/communication.ts index b570a3efe0..7a4f1424ae 100644 --- a/packages/presentation/src/communication.ts +++ b/packages/presentation/src/communication.ts @@ -60,7 +60,8 @@ import { type AttachmentID, type AttachmentData, type AttachmentParams, - type AttachmentUpdateData + type AttachmentUpdateData, + type WithTotal } from '@hcengineering/communication-types' import core, { generateId, @@ -368,9 +369,9 @@ class Client { ).value } - async findNotifications (params: FindNotificationsParams, queryId?: number): Promise { + async findNotifications (params: FindNotificationsParams, queryId?: number): Promise> { return ( - await this.connection.domainRequest(COMMUNICATION, { + await this.connection.domainRequest>(COMMUNICATION, { findNotifications: { params, queryId } }) ).value diff --git a/plugins/card-resources/src/components/navigator-next/NavigatorCard.svelte b/plugins/card-resources/src/components/navigator-next/NavigatorCard.svelte index abebd5d9ee..5fe7997f8d 100644 --- a/plugins/card-resources/src/components/navigator-next/NavigatorCard.svelte +++ b/plugins/card-resources/src/components/navigator-next/NavigatorCard.svelte @@ -15,7 +15,7 @@ - -{#if addedVote} - + + + {#if addedVote} -{:else} - + {voteLabel} + {:else} -{/if} + {/if} +