Skip to content

Commit 763ece0

Browse files
authored
Merge pull request #2833 from WISE-Community/issue-2832-filter-globally-pinned-discourse-topics
Hide globally-pinned discourse topics from teacher home page latest topics
2 parents 520cdfb + ae2e2e4 commit 763ece0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/webapp/site/src/app/teacher/discourse-recent-activity/discourse-recent-activity.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export class DiscourseRecentActivityComponent {
1111

1212
discourseURL: string;
1313
topics: any;
14-
users: any;
1514

1615
constructor(private configService: ConfigService, private http: HttpClient) {
1716
}
@@ -20,8 +19,9 @@ export class DiscourseRecentActivityComponent {
2019
this.discourseURL = this.configService.getDiscourseURL();
2120
this.http.get(`${this.discourseURL}/latest.json?order=activity`)
2221
.subscribe(({topic_list, users}: any)=> {
23-
this.topics = topic_list.topics.slice(0,3);
24-
this.users = users;
22+
this.topics = topic_list.topics
23+
.filter(topic => { return !topic.pinned_globally; })
24+
.slice(0, 3);
2525
});
2626
}
2727
}

0 commit comments

Comments
 (0)