refactor(app): rename ComponentDispatch to ComponentBus (#1844)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-24 12:29:38 +02:00
1 parent 01a29d629b
commit c285854b71
68 files changed
+219 -219

No files matched your search

@@ -9,13 +9,13 @@ type QuickReactionSnapshot = ReadonlyArray<FlatEmoji>;
type EmojiState = typeof import('@app/features/emoji/state/Emoji')['default'];
type EmojiPickerState = typeof import('@app/features/emoji/state/EmojiPicker')['default'];
type PermissionState = typeof import('@app/features/permissions/state/Permission')['default'];
type ComponentDispatchState = typeof import('@app/features/platform/utils/ComponentBus')['ComponentDispatch'];
type ComponentBusState = typeof import('@app/features/platform/utils/ComponentBus')['ComponentBus'];
interface QuickReactionDependencies {
Emoji: EmojiState;
EmojiPicker: EmojiPickerState;
Permission: PermissionState;
ComponentDispatch: ComponentDispatchState;
ComponentBus: ComponentBusState;
}
const EMPTY_QUICK_REACTIONS: QuickReactionSnapshot = Object.freeze([]);
@@ -39,11 +39,11 @@ function loadQuickReactionDependencies(): Promise<QuickReactionDependencies> {
Emoji: emojiModule.default,
EmojiPicker: emojiPickerModule.default,
Permission: permissionModule.default,
ComponentDispatch: componentBusModule.ComponentDispatch,
ComponentBus: componentBusModule.ComponentBus,
};
if (!dependencies) {
dependencies = loaded;
loaded.ComponentDispatch.subscribe('EMOJI_PICKER_RERENDER', () => {
loaded.ComponentBus.subscribe('EMOJI_PICKER_RERENDER', () => {
cacheEpoch += 1;
});
loaded.Permission.subscribe(() => {