add OOBE and update migration
OOBE can now be triggered every installation, whereas migration is trigerred for every update. However, update migration currently can't merge new and old, and this is TODO.
This commit is contained in:
parent
ccac75e750
commit
f27505504c
3 changed files with 48 additions and 11 deletions
|
@ -214,6 +214,10 @@ export function init(data) {
|
|||
PREFERENCES_ALL[`managed`] = DATA_MANAGED;
|
||||
});
|
||||
|
||||
chrome.storage.local.get(null, function(DATA_LOCAL){
|
||||
PREFERENCES_ALL[`local`] = DATA_LOCAL;
|
||||
});
|
||||
|
||||
chrome.storage.sync.get(null, function(DATA_SYNC){
|
||||
PREFERENCES_ALL[`sync`] = DATA_SYNC;
|
||||
});
|
||||
|
@ -245,7 +249,8 @@ export function init(data) {
|
|||
|
||||
PREFERENCE[`existing`] = (
|
||||
((PREFERENCES_ALL[`sync`]) ? (PREFERENCES_ALL[`sync`]).hasOwnProperty(PREFERENCE[`name`]) : false) ||
|
||||
((PREFERENCES_ALL[`managed`]) ? (PREFERENCES_ALL[`managed`]).hasOwnProperty(PREFERENCE[`name`]) : false)
|
||||
((PREFERENCES_ALL[`managed`]) ? (PREFERENCES_ALL[`managed`]).hasOwnProperty(PREFERENCE[`name`]) : false) ||
|
||||
((PREFERENCES_ALL[`local`]) ? (PREFERENCES_ALL[`local`]).hasOwnProperty(PREFERENCE[`local`]) : false)
|
||||
);
|
||||
|
||||
if (!PREFERENCE[`existing`]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue