Skip to content

Commit 1f667fc

Browse files
committed
fix: reload main tab after signin
1 parent 9907c34 commit 1f667fc

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/main/App.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export default class App {
8181
const paramIndex = argv.findIndex((i) => isValidProjectLink(i));
8282
const hasAppAuthorization = argv.find((i) => isAppAuthLink(i));
8383

84+
logger.debug("second-instance, hasAppAuthorization: ", hasAppAuthorization);
85+
8486
if (this.windowManager.tryHandleAppAuthRedeemUrl(hasAppAuthorization)) {
8587
return;
8688
}

src/main/Ui/WindowManager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Window from "./Window";
1414
import MenuManager from "./MenuManager";
1515
import { storage } from "Main/Storage";
1616
import { dialogs } from "Main/Dialogs";
17-
import { CHROME_GPU, DEFAULT_WIN_OPTIONS, HOMEPAGE, NEW_FILE_TAB_TITLE } from "Const";
17+
import { CHROME_GPU, DEFAULT_WIN_OPTIONS, HOMEPAGE, NEW_FILE_TAB_TITLE, RECENT_FILES } from "Const";
1818
import { normalizeUrl, isAppAuthGrandLink, isAppAuthRedeem, parseURL } from "Utils/Common";
1919
import { mkPath } from "Utils/Main";
2020

@@ -128,6 +128,9 @@ export default class WindowManager {
128128
if (secret) {
129129
for (const [_, window] of this.windows) {
130130
window.redeemAppAuth(secret);
131+
setTimeout(() => {
132+
window.loadUrlMainTab(RECENT_FILES);
133+
}, 1000);
131134
}
132135
return true;
133136
}

0 commit comments

Comments
 (0)