Procházet zdrojové kódy

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

factor2
Robert Pintilii před 2 roky
rodič
revize
b77db024f5
Žádný účet není propojen s e-mailovou adresou tvůrce revize

+ 1
- 1
react/features/base/ui/components/web/DialogWithTabs.tsx Zobrazit soubor

@@ -187,7 +187,7 @@ const DialogWithTabs = ({
187 187
 
188 188
     useEffect(() => {
189 189
         if (isMobile) {
190
-            setSelectedTab(undefined);
190
+            setSelectedTab(defaultTab);
191 191
         } else {
192 192
             setSelectedTab(defaultTab ?? tabs[0].name);
193 193
         }

+ 1
- 1
react/features/settings/actions.web.ts Zobrazit soubor

@@ -48,7 +48,7 @@ export function openLogoutDialog(onLogout: Function) {
48 48
  * welcome page or not.
49 49
  * @returns {Function}
50 50
  */
51
-export function openSettingsDialog(defaultTab: string, isDisplayedOnWelcomePage?: boolean) {
51
+export function openSettingsDialog(defaultTab?: string, isDisplayedOnWelcomePage?: boolean) {
52 52
     return openDialog(SettingsDialog, {
53 53
         defaultTab,
54 54
         isDisplayedOnWelcomePage

+ 2
- 3
react/features/settings/components/web/SettingsButton.ts Zobrazit soubor

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

Načítá se…
Zrušit
Uložit