From 1f7d3d22557689f5ade4d734aa3b28ffd3c8b405 Mon Sep 17 00:00:00 2001 From: Ximi1970 Date: Thu, 2 Nov 2023 19:51:55 +0100 Subject: [PATCH] Fix option handling --- webext/background.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/webext/background.js b/webext/background.js index cd1017b..d26c848 100644 --- a/webext/background.js +++ b/webext/background.js @@ -578,6 +578,7 @@ SysTrayX.Messaging = { "showNewIndicator", "countType", "startupDelay", + "apiCountMethod", "numberColor", "numberSize", "numberAlignment", @@ -614,6 +615,7 @@ SysTrayX.Messaging = { const showNewIndicator = result.showNewIndicator || "false"; const countType = result.countType || "0"; const startupDelay = result.startupDelay || "5"; + const apiCountMethod = result.apiCountMethod || "false"; let numberColor = result.numberColor || "#000000"; const numberSize = result.numberSize || "10"; const numberAlignment = result.numberAlignment || "4"; @@ -651,6 +653,7 @@ SysTrayX.Messaging = { showNewIndicator, countType, startupDelay, + apiCountMethod, numberColor, numberSize, numberAlignment, @@ -852,6 +855,13 @@ SysTrayX.Link = { }); } + const apiCountMethod = response["preferences"].apiCountMethod; + if (apiCountMethod !== undefined) { + await storage().set({ + apiCountMethod: apiCountMethod, + }); + } + const numberColor = response["preferences"].numberColor; if (numberColor) { await storage().set({