Skip to content

Commit

Permalink
SDA-4092: Clean Buttons (#1768)
Browse files Browse the repository at this point in the history
  • Loading branch information
NguyenTranHoangSym authored Mar 14, 2023
1 parent 828df78 commit f8db9e5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/main-api-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ ipcMain.on(
* This gets called from mana, when user logs out
*/
case apiCmds.closeAllWrapperWindows:
const main = windowHandler.getMainWindow();
terminateC9Shell();

main?.setThumbarButtons([]);
presenceStatus.updateSignedOutContextMenu();
windowHandler.closeAllWindows();
break;
case apiCmds.setZoomLevel:
Expand Down
12 changes: 12 additions & 0 deletions src/app/presence-status-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,18 @@ class PresenceStatus {
tray?.setContextMenu(contextMenu);
};

public updateSignedOutContextMenu = () => {
const tray = presenceStatusStore.getCurrentTray();
const contextDefault = Menu.buildFromTemplate([
{
label: i18n.t('Quit Symphony')(),
click: () => app.quit(),
},
]);

tray?.setContextMenu(contextDefault);
};

private handlePresenceChange = (
statusCategory: EPresenceStatusCategory,
statusGroup: EPresenceStatusGroup,
Expand Down

0 comments on commit f8db9e5

Please sign in to comment.