Migrate teamDropdownView to singleton (#2677)

This commit is contained in:
Devin Binnie
2023-04-14 12:14:11 -04:00
committed by GitHub
parent 1428ba694b
commit b71322a682
9 changed files with 107 additions and 121 deletions

View File

@@ -20,7 +20,6 @@ import {
SHOW_EDIT_SERVER_MODAL,
SHOW_REMOVE_SERVER_MODAL,
UPDATE_SHORTCUT_MENU,
UPDATE_LAST_ACTIVE,
GET_AVAILABLE_SPELL_CHECKER_LANGUAGES,
USER_ACTIVITY_UPDATE,
START_UPGRADE,
@@ -96,7 +95,6 @@ import {
handleSelectDownload,
handleSwitchServer,
handleSwitchTab,
handleUpdateLastActive,
handlePingDomain,
handleGetOrderedServers,
handleGetOrderedTabsForServer,
@@ -264,7 +262,6 @@ function initializeInterCommunicationEventListeners() {
ipcMain.handle('get-app-version', handleAppVersion);
ipcMain.on(UPDATE_SHORTCUT_MENU, handleUpdateMenuEvent);
ipcMain.on(FOCUS_BROWSERVIEW, ViewManager.focusCurrentView);
ipcMain.on(UPDATE_LAST_ACTIVE, handleUpdateLastActive);
if (process.platform !== 'darwin') {
ipcMain.on(OPEN_APP_MENU, handleOpenAppMenu);

View File

@@ -279,12 +279,6 @@ export async function handleSelectDownload(event: IpcMainInvokeEvent, startFrom:
return result.filePaths[0];
}
export function handleUpdateLastActive(event: IpcMainEvent, tabId: string) {
log.debug('handleUpdateLastActive', {tabId});
ServerManager.updateLastActive(tabId);
}
export function handlePingDomain(event: IpcMainInvokeEvent, url: string): Promise<string> {
return Promise.allSettled([
ping(new URL(`https://${url}`)),