Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Always enforce "unread" facet after marking all notifications as read

Henriette Darge8d0035abc523
diff --git a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts
index 9ccb9a51c1a..d74bf78b2e3 100644
--- a/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts
+++ b/frontend/src/app/features/in-app-notifications/center/state/ian-center.service.ts
@@ -156,7 +156,7 @@ export class IanCenterService extends UntilDestroyedMixin {
return {
...state.params,
filters: [
- ...IAN_FACET_FILTERS[state.activeFacet],
+ ...state.activeFacet === 'all' ? IAN_FACET_FILTERS.all : IAN_FACET_FILTERS.unread,
...(
hasFilters
? ([[state.filters.filter, '=', [state.filters.name]]] as ApiV3ListFilter[])
@@ -351,7 +351,7 @@ export class IanCenterService extends UntilDestroyedMixin {
@EffectCallback(notificationsMarkedRead)
private reloadOnNotificationRead(action:ReturnType<typeof notificationsMarkedRead>) {
if (action.all) {
- this.store.update({ activeCollection: { ids: [] } });
+ this.store.update({ activeCollection: { ids: [] }, activeFacet: 'unread' });
return;
}