diff --git a/src/app/components/shared/_dialogs/topic-cloud-filter/topic-cloud-filter.component.ts b/src/app/components/shared/_dialogs/topic-cloud-filter/topic-cloud-filter.component.ts index 9cbb6c256c607f7d967d345453fd4b883e47b114..d68f54e0152b6bfca4b9ba07eae7a3dbacd631e4 100644 --- a/src/app/components/shared/_dialogs/topic-cloud-filter/topic-cloud-filter.component.ts +++ b/src/app/components/shared/_dialogs/topic-cloud-filter/topic-cloud-filter.component.ts @@ -165,11 +165,13 @@ export class TopicCloudFilterComponent implements OnInit, OnDestroy { switch (this.continueFilter) { case 'continueWithAll': // all questions allowed - filter = new CommentListFilter(null); + filter = new CommentListFilter(this.tmpFilter); + filter.resetToDefault(); break; case 'continueWithAllFromNow': - filter = new CommentListFilter(null); + filter = new CommentListFilter(this.tmpFilter); + filter.resetToDefault(); filter.period = Period.fromNow; filter.fromNow = new Date().getTime(); break; @@ -183,10 +185,10 @@ export class TopicCloudFilterComponent implements OnInit, OnDestroy { } localStorage.setItem('tag-cloud-question', this.question); - - filter.save(); - - this.dialogRef.close(this.router.navigateByUrl(this.target)); + this.dialogRef.close(); + this.router.navigateByUrl(this.target).then(() => { + filter.save(); + }); }; }