fix(settings-dialog) On mobile open on the correct tab (#13443)

This commit is contained in:
Robert Pintilii
2023-06-12 13:55:32 +03:00
committed by GitHub
parent c8a87e368a
commit b77db024f5
3 changed files with 4 additions and 5 deletions

View File

@@ -6,7 +6,6 @@ import { translate } from '../../../base/i18n/functions';
import { IconGear } from '../../../base/icons/svg';
import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
import { openSettingsDialog } from '../../actions';
import { SETTINGS_TABS } from '../../constants';
/**
* The type of the React {@code Component} props of {@link SettingsButton}.
@@ -41,10 +40,10 @@ class SettingsButton extends AbstractButton<IProps> {
* @returns {void}
*/
_handleClick() {
const { defaultTab = SETTINGS_TABS.AUDIO, dispatch, isDisplayedOnWelcomePage = false } = this.props;
const { dispatch, isDisplayedOnWelcomePage = false } = this.props;
sendAnalytics(createToolbarEvent('settings'));
dispatch(openSettingsDialog(defaultTab, isDisplayedOnWelcomePage));
dispatch(openSettingsDialog(undefined, isDisplayedOnWelcomePage));
}
}