ソースを参照

fix(main-Toolbox): Display the correct buttons.

If some of the buttons from the main toolbar are disabled we were
displaying buttons from the overflow menu in their place.
factor2
Hristo Terezov 2年前
コミット
be55ccd6f4
1個のファイルの変更6行の追加2行の削除
  1. 6
    2
      react/features/toolbox/components/web/Toolbox.tsx

+ 6
- 2
react/features/toolbox/components/web/Toolbox.tsx ファイルの表示

@@ -1015,9 +1015,8 @@ class Toolbox extends Component<IProps> {
1015 1015
 
1016 1016
         this._setButtonsNotifyClickMode(buttons);
1017 1017
         const isHangupVisible = isToolbarButtonEnabled('hangup', _toolbarButtons);
1018
-        const { order } = THRESHOLDS.find(({ width }) => _clientWidth > width)
1018
+        let { order } = THRESHOLDS.find(({ width }) => _clientWidth > width)
1019 1019
             || THRESHOLDS[THRESHOLDS.length - 1];
1020
-        let sliceIndex = order.length + 2;
1021 1020
 
1022 1021
         const keys = Object.keys(buttons);
1023 1022
 
@@ -1028,6 +1027,11 @@ class Toolbox extends Component<IProps> {
1028 1027
             !_jwtDisabledButons.includes(key)
1029 1028
             && (isToolbarButtonEnabled(key, _toolbarButtons) || isToolbarButtonEnabled(alias, _toolbarButtons))
1030 1029
         );
1030
+        const filteredKeys = filtered.map(button => button.key);
1031
+
1032
+        order = order.filter(key => filteredKeys.includes(buttons[key as keyof typeof buttons].key));
1033
+
1034
+        let sliceIndex = order.length + 2;
1031 1035
 
1032 1036
         if (isHangupVisible) {
1033 1037
             sliceIndex -= 1;

読み込み中…
キャンセル
保存