DEV: Use a standard service injection (#23439)
A follow up to f73d8346c2
This commit is contained in:
parent
0f6ac634f4
commit
60bc4efda4
|
@ -37,6 +37,7 @@ import { cancel } from "@ember/runloop";
|
||||||
import discourseLater from "discourse-common/lib/later";
|
import discourseLater from "discourse-common/lib/later";
|
||||||
import { isTesting } from "discourse-common/config/environment";
|
import { isTesting } from "discourse-common/config/environment";
|
||||||
import { dependentKeyCompat } from "@ember/object/compat";
|
import { dependentKeyCompat } from "@ember/object/compat";
|
||||||
|
import { inject as service } from "@ember/service";
|
||||||
|
|
||||||
export const SECOND_FACTOR_METHODS = {
|
export const SECOND_FACTOR_METHODS = {
|
||||||
TOTP: 1,
|
TOTP: 1,
|
||||||
|
@ -167,6 +168,8 @@ function userOption(userOptionKey) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const User = RestModel.extend({
|
const User = RestModel.extend({
|
||||||
|
userTips: service(),
|
||||||
|
|
||||||
mailing_list_mode: userOption("mailing_list_mode"),
|
mailing_list_mode: userOption("mailing_list_mode"),
|
||||||
external_links_in_new_tab: userOption("external_links_in_new_tab"),
|
external_links_in_new_tab: userOption("external_links_in_new_tab"),
|
||||||
enable_quoting: userOption("enable_quoting"),
|
enable_quoting: userOption("enable_quoting"),
|
||||||
|
@ -1349,9 +1352,6 @@ User.reopenClass(Singleton, {
|
||||||
args = args || {};
|
args = args || {};
|
||||||
this.deleteStatusTrackingFields(args);
|
this.deleteStatusTrackingFields(args);
|
||||||
|
|
||||||
const owner = getOwner(this);
|
|
||||||
args.userTips = owner.lookup("service:user-tips");
|
|
||||||
|
|
||||||
return this._super(args);
|
return this._super(args);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue