diff options
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r-- | src/stores/AppStore.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 72ddc2927..9c8cce679 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ipcRenderer, shell } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { | 2 | import { |
3 | app, | 3 | app, |
4 | screen, | 4 | screen, |
@@ -33,7 +33,7 @@ import { | |||
33 | getServiceIdsFromPartitions, | 33 | getServiceIdsFromPartitions, |
34 | removeServicePartitionDirectory, | 34 | removeServicePartitionDirectory, |
35 | } from '../helpers/service-helpers'; | 35 | } from '../helpers/service-helpers'; |
36 | import { isValidExternalURL } from '../helpers/url-helpers'; | 36 | import { openExternalUrl } from '../helpers/url-helpers'; |
37 | import { sleep } from '../helpers/async-helpers'; | 37 | import { sleep } from '../helpers/async-helpers'; |
38 | 38 | ||
39 | const debug = require('debug')('Ferdi:AppStore'); | 39 | const debug = require('debug')('Ferdi:AppStore'); |
@@ -388,13 +388,9 @@ export default class AppStore extends Store { | |||
388 | } | 388 | } |
389 | } | 389 | } |
390 | 390 | ||
391 | // Ideally(?) this should be merged with the 'shell-helpers' functionality | ||
391 | @action _openExternalUrl({ url }) { | 392 | @action _openExternalUrl({ url }) { |
392 | const parsedUrl = new URL(url); | 393 | openExternalUrl(new URL(url)); |
393 | debug('open external url', parsedUrl); | ||
394 | |||
395 | if (isValidExternalURL(url)) { | ||
396 | shell.openExternal(url); | ||
397 | } | ||
398 | } | 394 | } |
399 | 395 | ||
400 | @action _checkForUpdates() { | 396 | @action _checkForUpdates() { |