From f19d36cbba1d7f9ea0479ae14a278deb860814e4 Mon Sep 17 00:00:00 2001 From: Tarek Khalil <45508821+khalilovcmded@users.noreply.github.com> Date: Tue, 5 Mar 2019 14:40:31 +0000 Subject: [PATCH] REFACTOR: Change `watch` wording to `unignore` (#7112) * REFACTOR: Change `watch` wording to `unignore` --- .../discourse/components/user-card-contents.js.es6 | 5 ----- app/assets/javascripts/discourse/controllers/user.js.es6 | 4 ++-- app/assets/javascripts/discourse/models/user.js.es6 | 2 +- app/assets/javascripts/discourse/templates/user.hbs | 4 ++-- app/controllers/users_controller.rb | 4 ++-- config/locales/client.en.yml | 2 +- config/routes.rb | 2 +- 7 files changed, 9 insertions(+), 14 deletions(-) diff --git a/app/assets/javascripts/discourse/components/user-card-contents.js.es6 b/app/assets/javascripts/discourse/components/user-card-contents.js.es6 index f81fc71af04..d13fcd101c1 100644 --- a/app/assets/javascripts/discourse/components/user-card-contents.js.es6 +++ b/app/assets/javascripts/discourse/components/user-card-contents.js.es6 @@ -195,11 +195,6 @@ export default Ember.Component.extend( this._close(); }, - watchUser() { - this.get("user").watch(); - this._close(); - }, - showUser() { this.showUser(this.get("user")); this._close(); diff --git a/app/assets/javascripts/discourse/controllers/user.js.es6 b/app/assets/javascripts/discourse/controllers/user.js.es6 index d6f577fe37f..48d271183eb 100644 --- a/app/assets/javascripts/discourse/controllers/user.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user.js.es6 @@ -152,9 +152,9 @@ export default Ember.Controller.extend(CanCheckEmails, { user.ignore().then(() => user.set("ignored", true)); }, - watchUser() { + unignoreUser() { const user = this.get("model"); - user.watch().then(() => user.set("ignored", false)); + user.unignore().then(() => user.set("ignored", false)); } } }); diff --git a/app/assets/javascripts/discourse/models/user.js.es6 b/app/assets/javascripts/discourse/models/user.js.es6 index ab7f31538d6..18963d737cb 100644 --- a/app/assets/javascripts/discourse/models/user.js.es6 +++ b/app/assets/javascripts/discourse/models/user.js.es6 @@ -622,7 +622,7 @@ const User = RestModel.extend({ }); }, - watch() { + unignore() { return ajax(`${userPath(this.get("username"))}/ignore.json`, { type: "DELETE", data: { ignored_user_id: this.get("id") } diff --git a/app/assets/javascripts/discourse/templates/user.hbs b/app/assets/javascripts/discourse/templates/user.hbs index 02ff00914ce..b702fd9b464 100644 --- a/app/assets/javascripts/discourse/templates/user.hbs +++ b/app/assets/javascripts/discourse/templates/user.hbs @@ -53,9 +53,9 @@