mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
desktop: fix auto updater events not sent to app
This commit is contained in:
committed by
Abdullah Atta
parent
a7011f0d6b
commit
042ac0d338
3
apps/desktop/app-update.yml
Normal file
3
apps/desktop/app-update.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
owner: streetwriters
|
||||
repo: notesnook
|
||||
provider: github
|
||||
@@ -191,6 +191,7 @@
|
||||
"allowNativeWayland": true
|
||||
},
|
||||
"extraResources": [
|
||||
"app-update.yml",
|
||||
"./assets/**"
|
||||
],
|
||||
"extraMetadata": {
|
||||
|
||||
@@ -90,6 +90,7 @@ async function createWindow() {
|
||||
}
|
||||
});
|
||||
|
||||
createIPCHandler({ router, windows: [mainWindow] });
|
||||
globalThis.window = mainWindow;
|
||||
mainWindowState.manage(mainWindow);
|
||||
|
||||
@@ -105,7 +106,6 @@ async function createWindow() {
|
||||
|
||||
await AssetManager.loadIcons();
|
||||
setupDesktopIntegration();
|
||||
createIPCHandler({ router, windows: [mainWindow] });
|
||||
|
||||
mainWindow.webContents.session.setSpellCheckerDictionaryDownloadURL(
|
||||
"http://dictionaries.notesnook.com/"
|
||||
|
||||
@@ -21,11 +21,13 @@ import { createTRPCProxyClient } from "@trpc/client";
|
||||
import { ipcLink } from "electron-trpc/renderer";
|
||||
import type { AppRouter } from "@notesnook/desktop";
|
||||
import { AppEventManager, AppEvents } from "../app-events";
|
||||
import { checkForUpdate } from "../../utils/updater";
|
||||
|
||||
export const desktop = createTRPCProxyClient<AppRouter>({
|
||||
links: [ipcLink()]
|
||||
});
|
||||
|
||||
document.addEventListener("readystatechange", async () => {
|
||||
desktop.updater.onChecking.subscribe(
|
||||
undefined,
|
||||
attachListener(AppEvents.checkingForUpdate)
|
||||
@@ -55,6 +57,7 @@ desktop.updater.onError.subscribe(
|
||||
undefined,
|
||||
attachListener(AppEvents.updateError)
|
||||
);
|
||||
});
|
||||
|
||||
function attachListener(event: string) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user