refactor: remove tab management and related IPC events for cleaner architecture
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import type { BrowserWindow } from 'electron'
|
||||
import { ipcMain } from 'electron';
|
||||
import { WINDOW_NAMES, MAIN_WIN_SIZE, IPC_EVENTS, MENU_IDS, CONVERSATION_ITEM_MENU_IDS, CONVERSATION_LIST_MENU_IDS, MESSAGE_ITEM_MENU_IDS, CONFIG_KEYS } from '@runtime/lib/constants'
|
||||
import { windowManager } from '@electron/service/window-service'
|
||||
import { menuManager } from '@electron/service/menu-service'
|
||||
import { logManager } from '@electron/service/logger'
|
||||
import { configManager } from '@electron/service/config-service'
|
||||
import { TabManager } from '@service/tab-manager'
|
||||
import { registerWindowHandlers } from '@electron/ipc/window-handlers'
|
||||
import { createTray, destroyTray } from '@electron/main/tray'
|
||||
|
||||
@@ -111,13 +109,6 @@ export function setupMainWindow() {
|
||||
handleTray(minimizeToTray, mainWindow);
|
||||
registerMenus(mainWindow);
|
||||
registerWindowHandlers(mainWindow);
|
||||
|
||||
const tabManager = new TabManager(mainWindow)
|
||||
tabManager.enable()
|
||||
|
||||
mainWindow.on('closed', () => {
|
||||
tabManager.destroy()
|
||||
})
|
||||
});
|
||||
|
||||
windowManager.create(WINDOW_NAMES.MAIN, MAIN_WIN_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user