fix leave server selected after opening once
This commit is contained in:
@@ -4,7 +4,7 @@ import { createAndShowNotification } from "./notification";
|
||||
import { Server } from "./preload-local-app/types";
|
||||
import settings, { SettingsData } from "./settings";
|
||||
import { loadShortcuts, setShortcutsEnabled } from "./shortcuts";
|
||||
import { getAppView, getWindow, hideAppView, showAppView } from "./window";
|
||||
import { getAppView, hideAppView, showAppView } from "./window";
|
||||
// import fetch from "node-fetch";
|
||||
|
||||
export function emitMuteToggle() {
|
||||
|
||||
@@ -6,8 +6,9 @@ import { loadCustomScheme } from "./serve";
|
||||
|
||||
let mainWindow: BrowserWindow | undefined;
|
||||
let appView: BrowserView | undefined;
|
||||
let appViewUrl = "";
|
||||
|
||||
const sidebarWidth = 75;
|
||||
const sidebarWidth = 80;
|
||||
|
||||
export function getWindow() {
|
||||
return mainWindow;
|
||||
@@ -128,8 +129,9 @@ export function showAppView(url?: string) {
|
||||
}
|
||||
mainWindow.addBrowserView(appView);
|
||||
|
||||
if (url) {
|
||||
if (url && url !== appViewUrl) {
|
||||
appView.webContents.loadURL(url);
|
||||
appViewUrl = url;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user