diff options
| author | anderklander <anderklander@gmail.com> | 2017-11-14 18:50:21 +0100 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-12-14 09:16:50 +0100 |
| commit | ed657f7892eb9263e15a0cf2ffb0caa60b32491c (patch) | |
| tree | 789a9dcdf150b7e5f9df098c2d1ae3a7680255ad /app/lib | |
| parent | 7c3d84ac86a5a29cbb456dbdce2f7af9696021cf (diff) | |
| download | mullvadvpn-ed657f7892eb9263e15a0cf2ffb0caa60b32491c.tar.xz mullvadvpn-ed657f7892eb9263e15a0cf2ffb0caa60b32491c.zip | |
Links/exit in platform.js
moved separate small files to platform.js to handle platform specific tasks
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/exit.android.js | 6 | ||||
| -rw-r--r-- | app/lib/exit.js | 6 | ||||
| -rw-r--r-- | app/lib/linking.android.js | 7 | ||||
| -rw-r--r-- | app/lib/linking.js | 7 | ||||
| -rw-r--r-- | app/lib/platform.android.js | 13 | ||||
| -rw-r--r-- | app/lib/platform.js | 13 |
6 files changed, 26 insertions, 26 deletions
diff --git a/app/lib/exit.android.js b/app/lib/exit.android.js deleted file mode 100644 index 4ec175203e..0000000000 --- a/app/lib/exit.android.js +++ /dev/null @@ -1,6 +0,0 @@ -// @flow -import { BackHandler } from 'react-native'; - -module.exports = function () { - BackHandler.exitApp(); -} diff --git a/app/lib/exit.js b/app/lib/exit.js deleted file mode 100644 index 95485a7cef..0000000000 --- a/app/lib/exit.js +++ /dev/null @@ -1,6 +0,0 @@ -// @flow -import { remote } from 'electron'; - -module.exports = function () { - remote.app.quit(); -} diff --git a/app/lib/linking.android.js b/app/lib/linking.android.js deleted file mode 100644 index f694f7685c..0000000000 --- a/app/lib/linking.android.js +++ /dev/null @@ -1,7 +0,0 @@ -// @flow -import { Linking } from 'react-native'; - -var open = (link) => { - Linking.openURL(link); -}; -export default open; diff --git a/app/lib/linking.js b/app/lib/linking.js deleted file mode 100644 index ccbedde767..0000000000 --- a/app/lib/linking.js +++ /dev/null @@ -1,7 +0,0 @@ -// @flow -import { shell } from 'electron'; - -var open = (link) => { - shell.openExternal(link); -}; -export default open;
\ No newline at end of file diff --git a/app/lib/platform.android.js b/app/lib/platform.android.js new file mode 100644 index 0000000000..f1f286826b --- /dev/null +++ b/app/lib/platform.android.js @@ -0,0 +1,13 @@ +// @flow +import { BackHandler } from 'react-native'; +import { Linking } from 'react-native'; + +const exit = () => { + BackHandler.exitApp(); +}; + +const open = (link) => { + Linking.openURL(link); +}; + +export {exit, open};
\ No newline at end of file diff --git a/app/lib/platform.js b/app/lib/platform.js new file mode 100644 index 0000000000..868a24e588 --- /dev/null +++ b/app/lib/platform.js @@ -0,0 +1,13 @@ +// @flow +import { remote } from 'electron'; +import { shell } from 'electron'; + +const exit = () => { + remote.app.quit(); +}; + +const open = (link) => { + shell.openExternal(link); +}; + +export {exit, open};
\ No newline at end of file |
