FIX: Deprecated overwriting of computed property

We can set `hide` to true instead of overwriting the property on
dismiss.
This commit is contained in:
Robin Ward 2020-10-02 13:26:57 -04:00
parent e6821fbaae
commit 070fe7f45d
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@ import discourseComputed from "discourse-common/utils/decorators";
import Component from "@ember/component"; import Component from "@ember/component";
export default Component.extend({ export default Component.extend({
hide: false,
@discourseComputed("banner.html") @discourseComputed("banner.html")
content(bannerHtml) { content(bannerHtml) {
const $div = $("<div>"); const $div = $("<div>");
@ -30,7 +32,7 @@ export default Component.extend({
if (this.user) { if (this.user) {
this.user.dismissBanner(this.get("banner.key")); this.user.dismissBanner(this.get("banner.key"));
} else { } else {
this.set("visible", false); this.set("hide", true);
this.keyValueStore.set({ this.keyValueStore.set({
key: "dismissed_banner_key", key: "dismissed_banner_key",
value: this.get("banner.key"), value: this.get("banner.key"),