mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Leere Notifications nicht anzeigen
This commit is contained in:
@@ -48,7 +48,19 @@ export class NotificationsHub extends SignalrHub {
|
||||
this.messageBoardItems$.next(current);
|
||||
}
|
||||
|
||||
notifications$ = this.messageBoardItems$.asObservable();
|
||||
notifications$ = this.messageBoardItems$.asObservable().pipe(
|
||||
map((data) => {
|
||||
const messages = { ...data };
|
||||
const keys = Object.keys(data);
|
||||
for (let key of keys) {
|
||||
if (data[key].length === 0 || data[key] === undefined) {
|
||||
delete messages[key];
|
||||
}
|
||||
}
|
||||
|
||||
return messages;
|
||||
})
|
||||
);
|
||||
|
||||
// notifications$ = merge(
|
||||
// of(this._getNotifications()).pipe(filter((f) => !!f)),
|
||||
|
||||
Reference in New Issue
Block a user