A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
fix(operator-pass): Open #operators closes user settings (#3801)
Hampus25f0d79a7255
diff --git a/fluxer_app/src/features/premium/components/operator_pass/OpenOperatorsButton.tsx b/fluxer_app/src/features/premium/components/operator_pass/OpenOperatorsButton.tsxindex d814cb752..b078fc6bb 100644--- a/fluxer_app/src/features/premium/components/operator_pass/OpenOperatorsButton.tsx+++ b/fluxer_app/src/features/premium/components/operator_pass/OpenOperatorsButton.tsx@@ -6,6 +6,7 @@ import {Logger} from '@app/features/platform/utils/AppLogger';import {openOperatorsChannel} from '@app/features/premium/commands/OperatorPassLabsCommands';import {OPEN_OPERATORS_DESCRIPTOR} from '@app/features/premium/utils/PremiumMessageDescriptors';import {Button, type ButtonVariant} from '@app/features/ui/button/Button';+import * as ModalCommands from '@app/features/ui/commands/ModalCommands';import * as ToastCommands from '@app/features/ui/commands/ToastCommands';import {msg} from '@lingui/core/macro';import {useLingui} from '@lingui/react/macro';@@ -37,6 +38,7 @@ export function OpenOperatorsButton({variant, onOpened, 'data-flx': flx}: OpenOpreturn;}onOpened?.();+ ModalCommands.popByModalType('user-settings');} catch (error) {logger.error('Failed to open #operators', error);ToastCommands.error(i18n._(TRY_AGAIN_IN_A_MOMENT_DESCRIPTOR));diff --git a/fluxer_app/src/features/user/components/modals/tabs/operator_pass_tab/OperatorPassLabsGreetingSetting.tsx b/fluxer_app/src/features/user/components/modals/tabs/operator_pass_tab/OperatorPassLabsGreetingSetting.tsxindex 55ecb3164..4780fa44d 100644--- a/fluxer_app/src/features/user/components/modals/tabs/operator_pass_tab/OperatorPassLabsGreetingSetting.tsx+++ b/fluxer_app/src/features/user/components/modals/tabs/operator_pass_tab/OperatorPassLabsGreetingSetting.tsx@@ -11,7 +11,6 @@ import {import OperatorPassHoldings from '@app/features/premium/state/OperatorPassHoldings';import {showsOperatorPassLabsSettings} from '@app/features/premium/utils/BillingTabVisibility';import {WALL_SAVE_FAILED_DESCRIPTOR} from '@app/features/premium/utils/PremiumMessageDescriptors';-import * as ModalCommands from '@app/features/ui/commands/ModalCommands';import * as ToastCommands from '@app/features/ui/commands/ToastCommands';import {Switch} from '@app/features/ui/components/form/FormSwitch';import styles from '@app/features/user/components/modals/tabs/operator_pass_tab/OperatorPassWallSettings.module.css';@@ -67,7 +66,6 @@ export const OperatorPassLabsGreetingSetting = observer(function OperatorPassLab<div className={styles.actions} data-flx="user.operator-pass-tab.operator-pass-labs-greeting-setting.actions"><OpenOperatorsButtonvariant="secondary"- onOpened={() => ModalCommands.popByModalType('user-settings')}data-flx="user.operator-pass-tab.operator-pass-labs-greeting-setting.button.open-operators"/></div>