Replace generic "Open mattermost" by a menu entry for each team.
This commit is contained in:
27
src/main.js
27
src/main.js
@@ -364,23 +364,22 @@ app.on('ready', function() {
|
||||
ipcMain.on('update-menu', (event, config) => {
|
||||
var app_menu = appMenu.createMenu(mainWindow, config);
|
||||
Menu.setApplicationMenu(app_menu);
|
||||
// set up context menu for tray icon
|
||||
if (shouldShowTrayIcon()) {
|
||||
const tray_menu = require('./main/menus/tray').createMenu(mainWindow, config);
|
||||
trayIcon.setContextMenu(tray_menu);
|
||||
if (process.platform === 'darwin') {
|
||||
// store the information, if the tray was initialized, for checking in the settings, if the application
|
||||
// was restarted after setting "Show icon on menu bar"
|
||||
if (trayIcon)
|
||||
mainWindow.trayWasVisible = true;
|
||||
else
|
||||
mainWindow.trayWasVisible = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
ipcMain.emit('update-menu', true, config);
|
||||
|
||||
// set up context menu for tray icon
|
||||
if (shouldShowTrayIcon()) {
|
||||
const tray_menu = require('./main/menus/tray').createDefault(mainWindow);
|
||||
trayIcon.setContextMenu(tray_menu);
|
||||
if (process.platform === 'darwin') {
|
||||
// store the information, if the tray was initialized, for checking in the settings, if the application
|
||||
// was restarted after setting "Show icon on menu bar"
|
||||
if (trayIcon)
|
||||
mainWindow.trayWasVisible = true;
|
||||
else
|
||||
mainWindow.trayWasVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Open the DevTools.
|
||||
// mainWindow.openDevTools();
|
||||
|
||||
|
Reference in New Issue
Block a user