mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-03-09 08:20:32 -07:00
feat: store all settings before quit
This commit is contained in:
parent
5c5e7f5f2f
commit
7dce635e6f
2 changed files with 2 additions and 1 deletions
|
|
@ -180,6 +180,7 @@ app.on(
|
|||
await Promise.all([
|
||||
wikiService.stopAllWiki(),
|
||||
windowService.clearWindowsReference(),
|
||||
databaseService.immediatelyStoreSettingsToFile(),
|
||||
]);
|
||||
destroyLogger();
|
||||
app.exit(0);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ const log = (message: string): void => {
|
|||
};
|
||||
async function refresh(): Promise<void> {
|
||||
// get path from src/constants/paths.ts
|
||||
log(`constantsFetched: ${String(constantsFetched)}`);
|
||||
if (!constantsFetched) {
|
||||
await Promise.all([
|
||||
context.get('CHROME_ERROR_PATH').then((pathName) => {
|
||||
|
|
@ -88,6 +87,7 @@ async function refresh(): Promise<void> {
|
|||
await windowService.loadURL(windowName, MAIN_WINDOW_WEBPACK_ENTRY);
|
||||
}
|
||||
} else if (window.location.href === CHROME_ERROR_PATH) {
|
||||
log(`window.location.href === CHROME_ERROR_PATH`);
|
||||
await windowService.loadURL(windowName, MAIN_WINDOW_WEBPACK_ENTRY);
|
||||
} else {
|
||||
setTimeout(() => void refresh(), CHECK_LOADED_INTERVAL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue