mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Upgrade to Ember 3.7.0
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import ComboBoxComponent from "select-kit/components/combo-box";
|
||||
import { on } from "ember-addons/ember-computed-decorators";
|
||||
import computed from "ember-addons/ember-computed-decorators";
|
||||
import PermissionType from "discourse/models/permission-type";
|
||||
import Category from "discourse/models/category";
|
||||
@@ -100,16 +99,6 @@ export default ComboBoxComponent.extend({
|
||||
return content;
|
||||
},
|
||||
|
||||
@on("didRender")
|
||||
_bindComposerResizing() {
|
||||
this.appEvents.on("composer:resized", this, this.applyDirection);
|
||||
},
|
||||
|
||||
@on("willDestroyElement")
|
||||
_unbindComposerResizing() {
|
||||
this.appEvents.off("composer:resized");
|
||||
},
|
||||
|
||||
didSelect(computedContentItem) {
|
||||
if (this.attrs.onChooseCategory) {
|
||||
this.attrs.onChooseCategory(computedContentItem.originalContent);
|
||||
|
||||
@@ -28,6 +28,6 @@ export default DropdownSelectBoxComponent.extend({
|
||||
},
|
||||
|
||||
mutateValue(value) {
|
||||
this.sendAction(value);
|
||||
this.get(value)();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -134,10 +134,10 @@ export default Ember.Component.extend(
|
||||
this.removeObserver(
|
||||
`content.@each.${this.get("nameProperty")}`,
|
||||
this,
|
||||
this._compute
|
||||
"_compute"
|
||||
);
|
||||
this.removeObserver(`content.[]`, this, this._compute);
|
||||
this.removeObserver(`asyncContent.[]`, this, this._compute);
|
||||
this.removeObserver(`content.[]`, this, "_compute");
|
||||
this.removeObserver(`asyncContent.[]`, this, "_compute");
|
||||
},
|
||||
|
||||
willComputeAttributes() {},
|
||||
|
||||
@@ -17,20 +17,20 @@ export default NotificationOptionsComponent.extend({
|
||||
return archetype === "private_message" ? "_pm" : "";
|
||||
},
|
||||
|
||||
_changed(msg) {
|
||||
if (this.get("computedValue") !== msg.id) {
|
||||
this.get("topic.details").updateNotifications(msg.id);
|
||||
}
|
||||
},
|
||||
|
||||
@on("didInsertElement")
|
||||
_bindGlobalLevelChanged() {
|
||||
this.appEvents.on("topic-notifications-button:changed", msg => {
|
||||
if (msg.type === "notification") {
|
||||
if (this.get("computedValue") !== msg.id) {
|
||||
this.get("topic.details").updateNotifications(msg.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.appEvents.on("topic-notifications-button:changed", this, "_changed");
|
||||
},
|
||||
|
||||
@on("willDestroyElement")
|
||||
_unbindGlobalLevelChanged() {
|
||||
this.appEvents.off("topic-notifications-button:changed");
|
||||
this.appEvents.off("topic-notifications-button:changed", this, "_changed");
|
||||
},
|
||||
|
||||
mutateValue(value) {
|
||||
|
||||
Reference in New Issue
Block a user