diff --git a/js/background.js b/js/background.js index ede5922..0eb57f9 100644 --- a/js/background.js +++ b/js/background.js @@ -538,7 +538,7 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { localStorage[LS_STORAGE_TYPE_PROP] = targetStorage; storage.get((response) => { window.Data = response[OLD_DATA_STORAGE_KEY]; - if (typeof Data === "undefined") { + if (typeof Data === "undefined" && !request.overridingSync) { // reset everuthing to before window.Data = oldData; makeDataReady(); diff --git a/js/commonDataHandlers.js b/js/commonDataHandlers.js index 12417e9..4eaaf73 100644 --- a/js/commonDataHandlers.js +++ b/js/commonDataHandlers.js @@ -154,7 +154,7 @@ function migrateData(transferData, callback) { Data.snippets = false; DBupdate(() => { - chrome.runtime.sendMessage({ changeStorageType: true }, (response) => { + chrome.runtime.sendMessage({ changeStorageType: true, overridingSync: transferData }, (response) => { if (response.completed === false) { Data.snippets = copyOfTheOldData; DBupdate(() => { diff --git a/manifest.json b/manifest.json index d52b106..21b96e9 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "ProKeys", "description": "Save time and effort in emails, etc. with ProKeys! Define snippets, do math in browser, auto complete braces, and much more.", - "version": "3.5.4", + "version": "3.5.2", "author": "Aquila Softworks", "browser_action": { "default_icon": "imgs/r16.png" diff --git a/tests/data/README.md b/tests/data/README.md index 1c655cd..dd4b4b4 100644 --- a/tests/data/README.md +++ b/tests/data/README.md @@ -9,6 +9,7 @@ It features several changes to default data, and the aim is that after upgrading ### Things to test in sync -1. Sync updates in one page are reflected on another within five minutes. +1. Sync updates in one page are reflected on another (after browser relaunch). 2. Too quick sync (set sync on in one pc and quickly set it in another) results in neat error message with no data loss. -3. upgrade from previous public version to next version does not cause any error. \ No newline at end of file +3. Upgrade from previous public version to next version does not cause any error. +4. \ No newline at end of file