Skip to content
Snippets Groups Projects
Commit 2e1dbb67 authored by Mohammad Alayoub's avatar Mohammad Alayoub
Browse files

fix showing profanitylist at begin

parent f19705b4
Branches
Tags
No related merge requests found
......@@ -75,9 +75,10 @@ export class TopicCloudAdministrationComponent implements OnInit, OnDestroy {
this.deviceType = localStorage.getItem('deviceType');
this.wsCommentServiceService.getCommentStream(localStorage.getItem('roomId')).subscribe(_ => this.updateKeywords());
this.blacklistSubscription = this.topicCloudAdminService.getBlacklist().subscribe(list => this.blacklist = list);
this.profanitywordlist = this.topicCloudAdminService.getProfanityListFromStorage();
this.profanitylistSubscription = this.topicCloudAdminService.getCustomProfanityList().subscribe(list => {
this.profanitywordlist = list;
this.updateKeywords();
this.profanitywordlist = list;
});
this.isCreatorOrMod = this.data.user.role !== UserRole.PARTICIPANT;
this.translateService.use(localStorage.getItem('currentLang'));
......@@ -171,10 +172,6 @@ export class TopicCloudAdministrationComponent implements OnInit, OnDestroy {
return this.topicCloudAdminService.filterProfanityWords(keyword);
}
getProfanityList() {
return this.topicCloudAdminService.getCustomProfanityList();
}
sortQuestions(sortMode?: string) {
if (sortMode !== undefined) {
this.sortMode = sortMode;
......
......@@ -63,13 +63,9 @@ export class TopicCloudAdminService {
_adminData.blacklist.concat(list);
}
if (_adminData.profanityFilter){
this.getCustomProfanityList().subscribe(plist => {
_adminData.blacklist = plist.concat(this.profanityWords);
this.adminData.next(_adminData);
});
} else {
this.adminData.next(_adminData);
_adminData.blacklist = this.getProfanityListFromStorage().concat(this.profanityWords);
}
this.adminData.next(_adminData);
});
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment