From 075af176dac283ca948c6902d4e2b7a6d957cf40 Mon Sep 17 00:00:00 2001 From: Kylie C <52550063+Covkie@users.noreply.github.com> Date: Sun, 7 Jul 2024 15:42:59 -0400 Subject: [PATCH] Combine title pruning operation --- src/main/mainWindow.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 436a8ba..2df4e77 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -447,8 +447,7 @@ function createMainWindow() { if (Settings.store.staticTitle) win.on("page-title-updated", e => e.preventDefault()); else if (Settings.store.appBadge) mainWin.webContents.on("page-title-updated", (_, title) => { - title = title.replace(/^\(\d+\)\s*|•\s/, ""); - mainWin.setTitle(title); + mainWin.setTitle(title.replace(/^\(\d+\)\s*|•\s/, "")); }); initWindowBoundsListeners(win);