From 60bc4efda43f4fdccf5ec4f3e7a858ee6fe10e18 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Wed, 6 Sep 2023 17:10:08 +0200 Subject: [PATCH] DEV: Use a standard service injection (#23439) A follow up to f73d8346c25a65d8543986aef25cfce70190d693 --- app/assets/javascripts/discourse/app/models/user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/app/models/user.js b/app/assets/javascripts/discourse/app/models/user.js index e6551551334..defe5e8437d 100644 --- a/app/assets/javascripts/discourse/app/models/user.js +++ b/app/assets/javascripts/discourse/app/models/user.js @@ -37,6 +37,7 @@ import { cancel } from "@ember/runloop"; import discourseLater from "discourse-common/lib/later"; import { isTesting } from "discourse-common/config/environment"; import { dependentKeyCompat } from "@ember/object/compat"; +import { inject as service } from "@ember/service"; export const SECOND_FACTOR_METHODS = { TOTP: 1, @@ -167,6 +168,8 @@ function userOption(userOptionKey) { } const User = RestModel.extend({ + userTips: service(), + mailing_list_mode: userOption("mailing_list_mode"), external_links_in_new_tab: userOption("external_links_in_new_tab"), enable_quoting: userOption("enable_quoting"), @@ -1349,9 +1352,6 @@ User.reopenClass(Singleton, { args = args || {}; this.deleteStatusTrackingFields(args); - const owner = getOwner(this); - args.userTips = owner.lookup("service:user-tips"); - return this._super(args); },