From c285854b7145cad39e04cece493aae268bf18100 Mon Sep 17 00:00:00 2001 From: Hampus Date: Mon, 24 Aug 2026 12:29:38 +0200 Subject: [PATCH] refactor(app): rename ComponentDispatch to ComponentBus (#1844) --- .../components/DesktopSettingsView.tsx | 4 +- .../dialogs/components/PlutoniumContent.tsx | 4 +- .../plutonium/GiftInventoryBanner.tsx | 4 +- .../app/components/layout/GuildLayout.tsx | 4 +- .../app/components/layout/GuildsLayout.tsx | 4 +- .../components/layout/KeyboardModeListener.ts | 4 +- .../handlers/defaultHandlers.ts | 38 +++++++++---------- .../components/ChannelAttachmentArea.tsx | 4 +- .../components/ChannelComposerDismissal.ts | 4 +- .../channel/components/ChannelHeader.tsx | 6 +-- .../channel/components/ChannelMessages.tsx | 20 +++++----- .../components/ChannelStickersArea.tsx | 6 +-- .../components/EditingMessageInput.tsx | 6 +-- .../channel/components/EmojiPicker.tsx | 4 +- .../features/channel/components/GiftEmbed.tsx | 4 +- .../channel/components/InviteEmbed.tsx | 4 +- .../LexicalChannelTextareaContent.tsx | 14 +++---- .../channel/components/MessageActionBar.tsx | 4 +- .../channel/components/MessageActionUtils.tsx | 8 ++-- .../channel/components/MobileEmojiPicker.tsx | 4 +- .../channel/components/MobileMemesPicker.tsx | 4 +- .../components/MobileStickersPicker.tsx | 4 +- .../channel/components/PinSystemMessage.tsx | 6 +-- .../components/PreloadableUserPopout.tsx | 6 +-- .../channel/components/StickersPicker.tsx | 4 +- .../channel/components/UploadManager.tsx | 4 +- .../components/channel_view/DMChannelView.tsx | 4 +- .../channel_view/GuildChannelView.tsx | 4 +- .../emoji_picker/SkinToneSelector.tsx | 4 +- .../useMessageSearchAutocomplete.ts | 4 +- .../pickers/gif/GifPickerGridItem.tsx | 6 +-- .../components/pickers/memes/MemeGridItem.tsx | 4 +- .../useChannelComposerGlobalShortcuts.ts | 4 +- .../hooks/useChannelMemberListVisibility.ts | 4 +- .../hooks/useChannelSearchVisibility.ts | 4 +- .../channel/state/QuickReactionStore.ts | 8 ++-- .../commands/DeveloperOptionsCommands.ts | 4 +- fluxer_app/src/features/emoji/state/Emoji.ts | 12 +++--- .../src/features/emoji/state/EmojiPicker.ts | 8 ++-- .../src/features/emoji/state/EmojiSticker.ts | 8 ++-- .../src/features/emoji/state/MemesPicker.ts | 6 +-- .../src/features/emoji/state/StickerPicker.ts | 6 +-- .../modals/ExpressionPickerSheet.tsx | 4 +- .../popouts/ExpressionPickerPopout.tsx | 4 +- .../features/inbox/commands/InboxCommands.tsx | 6 +-- .../composer/useLexicalAutocomplete.ts | 12 +++--- .../messaging/commands/MessageCommands.tsx | 8 ++-- .../messaging/hooks/useMarkdownKeybinds.ts | 4 +- .../messaging/hooks/useMessageSubmission.tsx | 6 +-- .../hooks/useTextareaAutocomplete.ts | 12 +++--- .../hooks/useTextareaExpressionHandlers.ts | 10 ++--- .../hooks/useTextareaExpressionPicker.tsx | 4 +- .../messaging/hooks/useTextareaKeyboard.ts | 6 +-- .../utils/ChannelTextareaFocusUtils.ts | 4 +- .../navigation/utils/DeepLinkUtils.ts | 4 +- .../features/platform/utils/ComponentBus.ts | 36 +++++++++--------- .../PremiumCheckoutReturnWatcher.tsx | 4 +- .../components/StreamerModeGate.tsx | 4 +- .../action_menu/items/MentionUserMenuItem.tsx | 4 +- .../items/VoiceParticipantMenuData.tsx | 4 +- .../src/features/ui/popover/PopoverPopout.tsx | 6 +-- .../components/modals/UserSettingsModal.tsx | 4 +- .../modals/tabs/AdvancedSettingsTab.tsx | 4 +- .../modals/tabs/ExpressionPacksTab.tsx | 4 +- .../modals/tabs/GiftInventoryTab.tsx | 4 +- .../components/modals/tabs/UserVideoTab.tsx | 4 +- .../tabs/components/CodecSelectorSection.tsx | 4 +- .../tabs/notifications_tab/TextToSpeech.tsx | 4 +- 68 files changed, 219 insertions(+), 219 deletions(-) diff --git a/fluxer_app/src/features/app/components/dialogs/components/DesktopSettingsView.tsx b/fluxer_app/src/features/app/components/dialogs/components/DesktopSettingsView.tsx index e2a5dca65..fbf8f3d24 100644 --- a/fluxer_app/src/features/app/components/dialogs/components/DesktopSettingsView.tsx +++ b/fluxer_app/src/features/app/components/dialogs/components/DesktopSettingsView.tsx @@ -31,7 +31,7 @@ import { SEARCH_SETTINGS_PLACEHOLDER_DESCRIPTOR, SIGN_OUT_DESCRIPTOR, } from '@app/features/i18n/utils/CommonMessageDescriptors'; -import {ComponentDispatch} from '@app/features/platform/utils/ComponentBus'; +import {ComponentBus} from '@app/features/platform/utils/ComponentBus'; import {remFromPx} from '@app/features/theme/layout/RemFromPx'; import {Button} from '@app/features/ui/button/Button'; import * as ModalCommands from '@app/features/ui/commands/ModalCommands'; @@ -223,7 +223,7 @@ const SidebarSections: React.FC = observer( scrollSpyContext.scrollToSection(sectionId); return; } - ComponentDispatch.dispatch('USER_SETTINGS_TAB_SELECT', {tab: tabType, section: sectionId}); + ComponentBus.dispatch('USER_SETTINGS_TAB_SELECT', {tab: tabType, section: sectionId}); }; return ( { - ComponentDispatch.dispatch('USER_SETTINGS_TAB_SELECT', {tab: 'gift_inventory'}); + ComponentBus.dispatch('USER_SETTINGS_TAB_SELECT', {tab: 'gift_inventory'}); }, []); const handleCancelSubscriptionConfirmed = useCallback(() => { ModalCommands.push( diff --git a/fluxer_app/src/features/app/components/dialogs/components/plutonium/GiftInventoryBanner.tsx b/fluxer_app/src/features/app/components/dialogs/components/plutonium/GiftInventoryBanner.tsx index abca1169a..1646d0945 100644 --- a/fluxer_app/src/features/app/components/dialogs/components/plutonium/GiftInventoryBanner.tsx +++ b/fluxer_app/src/features/app/components/dialogs/components/plutonium/GiftInventoryBanner.tsx @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPL-3.0-or-later import styles from '@app/features/app/components/dialogs/components/plutonium/GiftInventoryBanner.module.css'; -import {ComponentDispatch} from '@app/features/platform/utils/ComponentBus'; +import {ComponentBus} from '@app/features/platform/utils/ComponentBus'; import {shouldShowPremiumFeatures} from '@app/features/premium/utils/PremiumUtils'; import {Button} from '@app/features/ui/button/Button'; import type {User} from '@app/features/user/models/User'; @@ -37,7 +37,7 @@ export const GiftInventoryBanner: React.FC = observer(