Skip to content

Commit

Permalink
Differentiate neu's window API from global
Browse files Browse the repository at this point in the history
  • Loading branch information
jouni-kantola committed Mar 30, 2024
1 parent eacbe74 commit 437dab0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions resources/scripts/neutralino-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
init as neuInit,
os,
storage,
window,
window as neuWindow,
} from "@neutralinojs/lib";

const trayOptions = {
Expand All @@ -14,8 +14,7 @@ const trayOptions = {

export async function init() {
neuInit();
// @ts-expect-error
await window.setTitle(`Mob timer v${NL_APPVERSION}`);
await neuWindow.setTitle(`Mob timer v${window.NL_APPVERSION}`);
}

export async function updateTray(
Expand Down Expand Up @@ -59,11 +58,11 @@ export async function saveIntervalLength(seconds: number) {
}

export async function showWindow() {
await window.show();
await neuWindow.show();
}

export async function hideWindow() {
await window.hide();
await neuWindow.hide();
}

async function quitApp() {
Expand Down

0 comments on commit 437dab0

Please sign in to comment.