DEV: Add a missing service injection (#28890)

This commit is contained in:
Jarek Radosz 2024-09-12 23:20:33 +02:00 committed by GitHub
parent 6ba0dcdb0e
commit 4d484d89d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -1,10 +1,14 @@
// This class is adapted from emoji-store class in core. We want to maintain separate emoji store for reactions in chat plugin.
// https://github.com/discourse/discourse/blob/892f7e0506f3a4d40d9a59a4c926ff0a2aa0947e/app/assets/javascripts/discourse/app/services/emoji-store.js
import Service from "@ember/service";
import Service, { service } from "@ember/service";
import { disableImplicitInjections } from "discourse/lib/implicit-injections";
import KeyValueStore from "discourse/lib/key-value-store";
@disableImplicitInjections
export default class ChatEmojiReactionStore extends Service {
@service siteSettings;
STORE_NAMESPACE = "discourse_chat_emoji_reaction_";
MAX_DISPLAYED_EMOJIS = 20;
MAX_TRACKED_EMOJIS = this.MAX_DISPLAYED_EMOJIS * 2;

View File

@ -11,7 +11,6 @@ module("Discourse Chat | Unit | chat-emoji-reaction-store", function (hooks) {
"service:chat-emoji-reaction-store"
);
this.chatEmojiReactionStore.siteSettings = this.siteSettings;
this.chatEmojiReactionStore.reset();
});