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 201bad0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion react/features/toolbox/functions.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,19 @@ 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;
}
// other buttons are sorted by priority

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

View workflow job for this annotation

GitHub Actions / Lint

Expected line before comment
return 0;

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

View workflow job for this annotation

GitHub Actions / Lint

Expected blank line before this statement
});

return {
mainMenuButtons,
Expand Down

0 comments on commit 201bad0

Please sign in to comment.