DEV: Remove unneeded Model injections (#24546)
These are handled by our implicit-injections shim, or explicit injections
This commit is contained in:
parent
1da4e1be0a
commit
3a67a0280f
|
@ -1,5 +1,6 @@
|
|||
import EmberObject from "@ember/object";
|
||||
import { reads } from "@ember/object/computed";
|
||||
import { inject as service } from "@ember/service";
|
||||
import { emojiUnescape } from "discourse/lib/text";
|
||||
import {
|
||||
hasTrackedFilter,
|
||||
|
@ -16,6 +17,8 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||
import I18n from "discourse-i18n";
|
||||
|
||||
const NavItem = EmberObject.extend({
|
||||
topicTrackingState: service(),
|
||||
|
||||
@discourseComputed("name")
|
||||
title: {
|
||||
get(name) {
|
||||
|
|
|
@ -266,12 +266,6 @@ export default class StoreService extends Service {
|
|||
obj.__type = type;
|
||||
obj.__state = obj[adapter.primaryKey] ? "created" : "new";
|
||||
|
||||
// TODO: Have injections be automatic
|
||||
obj.topicTrackingState = this.register.lookup(
|
||||
"service:topic-tracking-state"
|
||||
);
|
||||
obj.keyValueStore = this.register.lookup("service:key-value-store");
|
||||
|
||||
const klass = this.register.lookupFactory("model:" + type) || RestModel;
|
||||
const model = klass.create(obj);
|
||||
|
||||
|
|
Loading…
Reference in New Issue