From d84af4cc3576166515060c532733b67c1f257958 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Mon, 24 Apr 2023 15:04:16 +0300 Subject: [PATCH] UI: Fixed show notification counter --- .../components/notification/notification-bell.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/notification/notification-bell.component.ts b/ui-ngx/src/app/modules/home/components/notification/notification-bell.component.ts index 6c35641348..8ee5771fe7 100644 --- a/ui-ngx/src/app/modules/home/components/notification/notification-bell.component.ts +++ b/ui-ngx/src/app/modules/home/components/notification/notification-bell.component.ts @@ -25,7 +25,7 @@ import { } from '@angular/core'; import { NotificationWebsocketService } from '@core/ws/notification-websocket.service'; import { BehaviorSubject, ReplaySubject, Subscription } from 'rxjs'; -import { distinctUntilChanged, share, tap } from 'rxjs/operators'; +import { distinctUntilChanged, map, share, tap } from 'rxjs/operators'; import { MatButton } from '@angular/material/button'; import { TbPopoverService } from '@shared/components/popover.service'; import { ShowNotificationPopoverComponent } from '@home/components/notification/show-notification-popover.component'; @@ -47,6 +47,7 @@ export class NotificationBellComponent implements OnDestroy { count$ = this.countSubject.asObservable().pipe( distinctUntilChanged(), + map((value) => value >= 100 ? '99+' : value), tap(() => setTimeout(() => this.cd.markForCheck())), share({ connector: () => new ReplaySubject(1)