aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-05-15 20:51:02 -0500
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-05-15 20:51:02 -0500
commitb697c160e64ecb614d96bd89c5572b93d91189a3 (patch)
treecaf616e5db63a5c64e30ea88b538235969964ab1 /src/stores
parentUpdate submodules, browserslist data updates and linter fixes [skip ci] (diff)
downloadferdium-app-b697c160e64ecb614d96bd89c5572b93d91189a3.tar.gz
ferdium-app-b697c160e64ecb614d96bd89c5572b93d91189a3.tar.zst
ferdium-app-b697c160e64ecb614d96bd89c5572b93d91189a3.zip
Use DEFAULT_SERVICE_SETTINGS for default values (remove duplication)
Added TODO comments, notes, debug logs.
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/SettingsStore.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js
index 6b6b77454..7afecd9df 100644
--- a/src/stores/SettingsStore.js
+++ b/src/stores/SettingsStore.js
@@ -188,10 +188,9 @@ export default class SettingsStore extends Store {
188 188
189 // Helper 189 // Helper
190 async _migrate() { 190 async _migrate() {
191 const legacySettings = localStorage.getItem('app') || {};
192
193 this._ensureMigrationAndMarkDone('password-hashing', () => { 191 this._ensureMigrationAndMarkDone('password-hashing', () => {
194 if (this.stores.settings.app.lockedPassword !== '') { 192 if (this.stores.settings.app.lockedPassword !== '') {
193 const legacySettings = localStorage.getItem('app') || {};
195 this.actions.settings.update({ 194 this.actions.settings.update({
196 type: 'app', 195 type: 'app',
197 data: { 196 data: {
@@ -200,7 +199,7 @@ export default class SettingsStore extends Store {
200 }); 199 });
201 } 200 }
202 201
203 debug('Migrated updates settings'); 202 debug('Migrated password-hashing settings');
204 }); 203 });
205 204
206 this._ensureMigrationAndMarkDone('5.6.0-beta.6-settings', () => { 205 this._ensureMigrationAndMarkDone('5.6.0-beta.6-settings', () => {
@@ -210,6 +209,8 @@ export default class SettingsStore extends Store {
210 searchEngine: DEFAULT_APP_SETTINGS.searchEngine, 209 searchEngine: DEFAULT_APP_SETTINGS.searchEngine,
211 }, 210 },
212 }); 211 });
212
213 debug('Migrated default search engine settings');
213 }); 214 });
214 215
215 this._ensureMigrationAndMarkDone('user-agent-settings', () => { 216 this._ensureMigrationAndMarkDone('user-agent-settings', () => {
@@ -219,6 +220,8 @@ export default class SettingsStore extends Store {
219 userAgentPref: DEFAULT_APP_SETTINGS.userAgentPref, 220 userAgentPref: DEFAULT_APP_SETTINGS.userAgentPref,
220 }, 221 },
221 }); 222 });
223
224 debug('Migrated default user-agent settings');
222 }); 225 });
223 } 226 }
224} 227}