diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-05-15 18:34:25 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-15 15:04:25 +0200 |
commit | 8ef5380b941a8f1483ee5d30e61a5086e669b12e (patch) | |
tree | 8e4db26f558722622738c17c21f97187cdb23ea0 /src/stores/SettingsStore.js | |
parent | Minor refactoring to have consistent command-line invocations. (diff) | |
download | ferdium-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.js | 20 |
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'; |
5 | import localStorage from 'mobx-localstorage'; | 5 | import localStorage from 'mobx-localstorage'; |
6 | import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES, LOCAL_SERVER } from '../config'; | 6 | import { |
7 | DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES, LOCAL_SERVER, SEARCH_ENGINE_DDG, | ||
8 | } from '../config'; | ||
7 | import { API } from '../environment'; | 9 | import { API } from '../environment'; |
8 | import { getLocale } from '../helpers/i18n-helpers'; | 10 | import { getLocale } from '../helpers/i18n-helpers'; |
9 | import { hash } from '../helpers/password-helpers'; | 11 | import { 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 | } |