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

Avoid scan on the halEvents to return only the buffered events

Oliver Günther316d8484ee5f
diff --git a/frontend/src/app/modules/hal/services/hal-events.service.ts b/frontend/src/app/modules/hal/services/hal-events.service.ts
index d3d25c308d7..0ec778709b7 100644
--- a/frontend/src/app/modules/hal/services/hal-events.service.ts
+++ b/frontend/src/app/modules/hal/services/hal-events.service.ts
@@ -1,6 +1,6 @@
import {Injectable} from "@angular/core";
import {Observable, Subject} from "rxjs";
-import {buffer, debounceTime, filter, scan} from "rxjs/operators";
+import {buffer, debounceTime, filter} from "rxjs/operators";
import {HalResource} from "core-app/modules/hal/resources/hal-resource";
import {ResourceChangesetCommit} from "core-app/modules/fields/edit/services/hal-resource-editing.service";
@@ -45,8 +45,7 @@ export class HalEventsService {
.events$
.pipe(
filter((event:HalEvent) => event.resourceType === resourceType),
- buffer(this.events$.pipe(debounceTime(debounceTimeInMs))),
- scan((acc, curr) => acc.concat(curr))
+ buffer(this.events$.pipe(debounceTime(debounceTimeInMs)))
);
}