Skip to content

Commit

Permalink
feat(toolbox): updated getVisibleNativeButtons
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinteodor committed Feb 11, 2025
1 parent b30e5f0 commit 2138d90
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion react/features/toolbox/functions.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,21 @@ export function getVisibleNativeButtons({ allButtons, clientWidth, mainToolbarBu
button && mainButtonsKeys.push(button);
}

const mainMenuButtons = mainButtonsKeys.map(key => allButtons[key]);
const mainMenuButtons = mainButtonsKeys.map(key => allButtons[key])
.sort((a, b) => {

// Native toolbox includes hangup and overflowmenu button keys, too
// hangup goes last, overflowmenu goes second-to-last
if (a.key === 'hangup' || a.key === 'overflowmenu') {
return 1;
}
if (b.key === 'hangup' || b.key === 'overflowmenu') {
return -1;
}

Check failure on line 112 in react/features/toolbox/functions.native.ts

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces not allowed

Check failure on line 112 in react/features/toolbox/functions.native.ts

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces not allowed
// other buttons are sorted by priority
return 0;
});

return {
mainMenuButtons,
Expand Down

0 comments on commit 2138d90

Please sign in to comment.