Skip to content

Commit af78b50

Browse files
committed
Fix: For archive and under review too
1 parent a577e36 commit af78b50

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

apps/web-mzima-client/src/app/post/post-head/post-head.component.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export class PostHeadComponent extends BaseComponent implements OnInit {
7272
underReview() {
7373
this.postsService.updateStatus(this.post.id, PostStatus.Draft).subscribe((res) => {
7474
this.post = res.result;
75-
this.statusChanged.emit();
75+
this.eventBusService.next({
76+
type: EventType.StatusChange,
77+
payload: this.post,
78+
});
7679
});
7780
}
7881

@@ -103,7 +106,10 @@ export class PostHeadComponent extends BaseComponent implements OnInit {
103106
archive() {
104107
this.postsService.updateStatus(this.post.id, PostStatus.Archived).subscribe((res) => {
105108
this.post = res.result;
106-
this.statusChanged.emit();
109+
this.eventBusService.next({
110+
type: EventType.StatusChange,
111+
payload: this.post,
112+
});
107113
});
108114
}
109115

0 commit comments

Comments
 (0)