DEV: Remove unneeded Model injections (#24546)

These are handled by our implicit-injections shim, or explicit injections
This commit is contained in:
David Taylor 2023-11-24 14:20:02 +00:00 committed by GitHub
parent 1da4e1be0a
commit 3a67a0280f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -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) {

View File

@ -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);