From 9db9cd93731dc42fbfbd384fe24eed94224ac4bd Mon Sep 17 00:00:00 2001 From: AvaLilac Date: Tue, 24 Mar 2026 05:33:31 -0400 Subject: [PATCH] Change the windows title from Stoat to AviaClient To match upcoming updates --- src/main.ts | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 56839e3..6d4136a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,6 +12,16 @@ import { BUILD_URL, createMainWindow, mainWindow } from "./native/window"; import * as fs from "fs"; import * as path from "path"; +const applyAppName = () => { + try { + app.setName("AviaClient"); + (app as any).name = "AviaClient"; + if (process.platform === "win32") { + app.setAppUserModelId("AviaClient"); + } + } catch {} +}; + if (started) { app.quit(); } @@ -60,7 +70,15 @@ if (acquiredLock) { updateElectronApp({ onNotifyUser }); app.on("ready", () => { + applyAppName(); createMainWindow(); + if (mainWindow) { + mainWindow.setTitle("AviaClient"); + mainWindow.on("page-title-updated", (e) => { + e.preventDefault(); + mainWindow.setTitle("AviaClient"); + }); + } loadInject(); if (config.firstLaunch) { @@ -74,7 +92,7 @@ if (acquiredLock) { initDiscordRpc(); if (process.platform === "win32") { - app.setAppUserModelId("chat.stoat.notifications"); + app.setAppUserModelId("AviaClient"); } }); @@ -93,6 +111,13 @@ if (acquiredLock) { app.on("activate", () => { if (BrowserWindow.getAllWindows().length === 0) { createMainWindow(); + if (mainWindow) { + mainWindow.setTitle("AviaClient"); + mainWindow.on("page-title-updated", (e) => { + e.preventDefault(); + mainWindow.setTitle("AviaClient"); + }); + } loadInject(); } else { mainWindow.show(); @@ -123,4 +148,4 @@ if (acquiredLock) { }); } else { app.quit(); -} +} \ No newline at end of file