Improved reactive fassade

pull/4769/head
Roman Roelofsen 8 years ago
parent d2d5ff0eef
commit 7728c3cc88
  1. 9
      frontend/app/components/work-packages/work-package-cache.service.ts

@ -58,16 +58,19 @@ export class WorkPackageCacheService {
updateWorkPackageList(list: WorkPackageResource[]) { updateWorkPackageList(list: WorkPackageResource[]) {
for (const wp of list) { for (const wp of list) {
// var cached = this.workPackageCache[wp.id];
// TODO RR Question: This check doesn't seem to be right!? // var cached = this.workPackageCache[wp.id];
// if (cached && cached.dirty) { // if (cached && cached.dirty) {
// this.workPackageCache[wp.id] = cached; // this.workPackageCache[wp.id] = cached;
// } else { // } else {
// this.workPackageCache[wp.id] = wp; // this.workPackageCache[wp.id] = wp;
// } // }
states.workPackages.put(wp.id.toString(), wp); // TODO Roman: clarify with Jens/Oliver. Is this check still ok?
if (!wp.dirty) {
states.workPackages.put(wp.id.toString(), wp);
}
} }
// this.workPackagesSubject.onNext(this.workPackageCache); // this.workPackagesSubject.onNext(this.workPackageCache);
} }

Loading…
Cancel
Save