Skip to content

Commit

Permalink
Merge pull request #22 from Team-BTMC/fix-win-reload
Browse files Browse the repository at this point in the history
Fix window reload.
  • Loading branch information
CaptSiro authored Oct 4, 2024
2 parents 01861ac + 5969d90 commit 8ea8db2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { electronApp, is, optimizer } from '@electron-toolkit/utils';
import icon from '../../resources/icon.png?asset';
import { main } from './main';
import trackBounds, { getBounds, wasMaximized } from './lib/window/resizer';
import { Router } from './lib/route-pass/Router';



Expand All @@ -30,8 +31,9 @@ async function createWindow() {

trackBounds(window);

window.on('ready-to-show', () => {
window.on('ready-to-show', async () => {
window.show();
await Router.dispatch(window, "changeScene", "main");
});

// HMR for renderer base on electron-vite cli.
Expand Down
2 changes: 0 additions & 2 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ export async function main(window: BrowserWindow) {
await showError(window, `No songs found in folder: ${orDefault(settings.get("osuSongsDir"), "[No folder]")}. Please make sure this is the directory where you have all your songs saved.`);
await configureOsuDir(window);
}

await Router.dispatch(window, "changeScene", "main");
}


Expand Down

0 comments on commit 8ea8db2

Please sign in to comment.