From e013625710b5c0bcd15ae69896494060e76e52c3 Mon Sep 17 00:00:00 2001 From: baku Date: Fri, 24 Feb 2017 08:42:45 +0100 Subject: [PATCH] Default Containers re-created if the addon is installed/enabled - issue #255 --- index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/index.js b/index.js index 228edd7..40b35c3 100644 --- a/index.js +++ b/index.js @@ -139,6 +139,17 @@ const ContainerService = { identity.color); } } + + // Let's create the default containers in case there are none. + if (prefService.get("privacy.userContext.enabled") !== true && + ss.storage.savedConfiguration.preInstalledIdentities.length === 0) { + // Note: we have to create them in this way because there is no way to + // reuse the same ID and the localized strings. + ContextualIdentityService.create("Personal", "fingerprint", "blue"); + ContextualIdentityService.create("Work", "briefcase", "orange"); + ContextualIdentityService.create("Finance", "dollar", "green"); + ContextualIdentityService.create("Shopping", "cart", "pink"); + } } // Enabling preferences