|
@@ -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;
|