aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/SettingsStore.js
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-05-15 18:34:25 +0530
committerLibravatar GitHub <noreply@github.com>2021-05-15 15:04:25 +0200
commit8ef5380b941a8f1483ee5d30e61a5086e669b12e (patch)
tree8e4db26f558722622738c17c21f97187cdb23ea0 /src/stores/SettingsStore.js
parentMinor refactoring to have consistent command-line invocations. (diff)
downloadferdium-app-8ef5380b941a8f1483ee5d30e61a5086e669b12e.tar.gz
ferdium-app-8ef5380b941a8f1483ee5d30e61a5086e669b12e.tar.zst
ferdium-app-8ef5380b941a8f1483ee5d30e61a5086e669b12e.zip
Adding DuckDuckGo as an alternative search engine (#1414)
* Adding DuckDuckGo as an alternative search engine. * Fixing review comments. * Fixing review comments.
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r--src/stores/SettingsStore.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js
index 83f6f9c89..ced286052 100644
--- a/src/stores/SettingsStore.js
+++ b/src/stores/SettingsStore.js
@@ -3,7 +3,9 @@ import {
3 action, computed, observable, reaction, 3 action, computed, observable, reaction,
4} from 'mobx'; 4} from 'mobx';
5import localStorage from 'mobx-localstorage'; 5import localStorage from 'mobx-localstorage';
6import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES, LOCAL_SERVER } from '../config'; 6import {
7 DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES, LOCAL_SERVER, SEARCH_ENGINE_DDG,
8} from '../config';
7import { API } from '../environment'; 9import { API } from '../environment';
8import { getLocale } from '../helpers/i18n-helpers'; 10import { getLocale } from '../helpers/i18n-helpers';
9import { hash } from '../helpers/password-helpers'; 11import { hash } from '../helpers/password-helpers';
@@ -301,5 +303,21 @@ export default class SettingsStore extends Store {
301 303
302 debug('Migrated updates settings'); 304 debug('Migrated updates settings');
303 } 305 }
306
307 if (!this.all.migration['5.6.0-beta.6-settings']) {
308 this.actions.settings.update({
309 type: 'app',
310 data: {
311 searchEngine: SEARCH_ENGINE_DDG,
312 },
313 });
314
315 this.actions.settings.update({
316 type: 'migration',
317 data: {
318 '5.6.0-beta.6-settings': true,
319 },
320 });
321 }
304 } 322 }
305} 323}