diff options
m--------- | maze-utils | 0 | ||||
m--------- | public/_locales | 0 | ||||
-rw-r--r-- | src/background.ts | 3 | ||||
-rw-r--r-- | src/config.ts | 6 |
4 files changed, 7 insertions, 2 deletions
diff --git a/maze-utils b/maze-utils -Subproject 2aa3c0bc23c2100ef7eb4963aa116e4182a7f16 +Subproject eb921d947595c06341ebb53dbce1d6ea67cb88d diff --git a/public/_locales b/public/_locales -Subproject b31f76dd29e8d12cf6e58e74a75709a4944a6ea +Subproject 017d0436c7e0b034a44f494d68eec2541b7dd62 diff --git a/src/background.ts b/src/background.ts index d7d95819..99df62db 100644 --- a/src/background.ts +++ b/src/background.ts @@ -121,7 +121,7 @@ chrome.runtime.onInstalled.addListener(function () { const userID = Config.config.userID; // If there is no userID, then it is the first install. - if (!userID){ + if (!userID && !Config.local.alreadyInstalled){ //open up the install page chrome.tabs.create({url: chrome.extension.getURL("/help/index.html")}); @@ -129,6 +129,7 @@ chrome.runtime.onInstalled.addListener(function () { const newUserID = generateUserID(); //save this UUID Config.config.userID = newUserID; + Config.local.alreadyInstalled = true; // Don't show update notification Config.config.categoryPillUpdate = true; diff --git a/src/config.ts b/src/config.ts index a753a36f..09a3ebfb 100644 --- a/src/config.ts +++ b/src/config.ts @@ -137,6 +137,9 @@ interface SBStorage { /* VideoID prefixes to UUID prefixes */ downvotedSegments: Record<VideoID & HashedValue, VideoDownvotes>; navigationApiAvailable: boolean; + + // Used when sync storage disbaled + alreadyInstalled: boolean; } class ConfigClass extends ProtoConfig<SBConfig, SBStorage> { @@ -456,7 +459,8 @@ const syncDefaults = { const localDefaults = { downvotedSegments: {}, - navigationApiAvailable: null + navigationApiAvailable: null, + alreadyInstalled: false }; const Config = new ConfigClass(syncDefaults, localDefaults, migrateOldSyncFormats); |