FIX: use the correct notification levels descriptions for PMs

This commit is contained in:
OsamaSayegh 2018-06-11 12:35:13 +03:00 committed by Sam
parent f058942343
commit 06777aa47d

View File

@ -1,5 +1,5 @@
import NotificationOptionsComponent from "select-kit/components/notifications-button";
import { on } from "ember-addons/ember-computed-decorators";
import { default as computed, on } from "ember-addons/ember-computed-decorators";
import { topicLevels } from "discourse/lib/notification-levels";
export default NotificationOptionsComponent.extend({
@ -9,6 +9,11 @@ export default NotificationOptionsComponent.extend({
i18nPrefix: "topic.notifications",
allowInitialValueMutation: false,
@computed("topic.archetype")
i18nPostfix(archetype) {
return archetype === "private_message" ? "_pm" : "";
},
@on("didInsertElement")
_bindGlobalLevelChanged() {
this.appEvents.on("topic-notifications-button:changed", (msg) => {