summaryrefslogtreecommitdiffhomepage
path: root/app/lib
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-06-29 11:25:19 +0200
committerAndrej Mihajlov <and@mullvad.net>2018-07-03 13:37:54 +0200
commitb3a6f58d7027e5961180b52d6473f7f504638284 (patch)
treef6e5f8b4f8dc72ae1bae0ddfe715b8094deb3750 /app/lib
parentda08e7752430feb58848172cd76176141e9af82f (diff)
downloadmullvadvpn-b3a6f58d7027e5961180b52d6473f7f504638284.tar.xz
mullvadvpn-b3a6f58d7027e5961180b52d6473f7f504638284.zip
Migrate to app.getVersion()
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/platform.android.js7
-rw-r--r--app/lib/platform.js6
2 files changed, 11 insertions, 2 deletions
diff --git a/app/lib/platform.android.js b/app/lib/platform.android.js
index fe7fd533f2..1dc450b359 100644
--- a/app/lib/platform.android.js
+++ b/app/lib/platform.android.js
@@ -1,9 +1,14 @@
// @flow
import { BackHandler, Linking } from 'react-native';
import { MobileAppBridge } from 'NativeModules';
+import { version } from '../../package.json';
const log = console.log;
+const getAppVersion = () => {
+ return version;
+};
+
const exit = () => {
BackHandler.exitApp();
};
@@ -16,4 +21,4 @@ const openItem = (path: string) => {
MobileAppBridge.openItem(path);
};
-export { log, exit, openLink, openItem };
+export { log, exit, openLink, openItem, getAppVersion };
diff --git a/app/lib/platform.js b/app/lib/platform.js
index 2b078b8bb6..ecbd32a27a 100644
--- a/app/lib/platform.js
+++ b/app/lib/platform.js
@@ -4,6 +4,10 @@ import electronLog from 'electron-log';
const log = electronLog;
+const getAppVersion = () => {
+ return remote.app.getVersion();
+};
+
const exit = () => {
remote.app.quit();
};
@@ -16,4 +20,4 @@ const openItem = (path: string) => {
shell.openItem(path);
};
-export { log, exit, openLink, openItem };
+export { log, exit, openLink, openItem, getAppVersion };