summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/app.android.js4
-rw-r--r--app/app.js2
-rw-r--r--app/components/Accordion.js10
-rw-r--r--app/components/TransitionContainerStyles.android.js1
-rw-r--r--app/lib/rpc-address-file.js2
5 files changed, 13 insertions, 6 deletions
diff --git a/app/app.android.js b/app/app.android.js
index e16c3cc6a6..0cb07a8600 100644
--- a/app/app.android.js
+++ b/app/app.android.js
@@ -39,7 +39,9 @@ DeviceEventEmitter.addListener('com.mullvad.daemon-connection-ready', async (_ev
});
MobileAppBridge.startBackend()
- .then((_response) => {})
+ .then((_response) => {
+ return;
+ })
.catch((e) => {
log.error('Failed starting backend:', e);
});
diff --git a/app/app.js b/app/app.js
index 76d92a1b55..6dc4acce58 100644
--- a/app/app.js
+++ b/app/app.js
@@ -440,7 +440,7 @@ export default class AppRenderer {
}
_requestCredentials(): Promise<RpcCredentials> {
- return new Promise((resolve, _reject) => {
+ return new Promise((resolve) => {
ipcRenderer.once('daemon-connection-ready', (_event, credentials: RpcCredentials) => {
resolve(credentials);
});
diff --git a/app/components/Accordion.js b/app/components/Accordion.js
index f69389f6c7..8197fd0e61 100644
--- a/app/components/Accordion.js
+++ b/app/components/Accordion.js
@@ -2,6 +2,7 @@
import * as React from 'react';
import { Component, View, Styles, Animated, UserInterface } from 'reactxp';
+import { log } from '../lib/platform';
export type AccordionProps = {
height: number | 'auto',
@@ -89,7 +90,7 @@ export default class Accordion extends Component<AccordionProps, AccordionState>
);
}
- _animateHeightChanges() {
+ async _animateHeightChanges() {
const containerView = this._containerView;
if (!containerView) {
return;
@@ -100,7 +101,8 @@ export default class Accordion extends Component<AccordionProps, AccordionState>
this._animation = null;
}
- UserInterface.measureLayoutRelativeToWindow(containerView).then((layout) => {
+ try {
+ const layout = await UserInterface.measureLayoutRelativeToWindow(containerView);
const fromValue = this.state.animatedValue || Animated.createValue(layout.height);
const toValue = this.props.height === 'auto' ? this._contentHeight : this.props.height;
@@ -119,7 +121,9 @@ export default class Accordion extends Component<AccordionProps, AccordionState>
this.setState({ animatedValue: fromValue }, () => {
animation.start(this._onAnimationEnd);
});
- });
+ } catch (error) {
+ log.error(`Failed to measure the layout of Accordion: ${error.message}`);
+ }
}
_onAnimationEnd = ({ finished }) => {
diff --git a/app/components/TransitionContainerStyles.android.js b/app/components/TransitionContainerStyles.android.js
index b234ff4be0..c894d9fb01 100644
--- a/app/components/TransitionContainerStyles.android.js
+++ b/app/components/TransitionContainerStyles.android.js
@@ -9,6 +9,7 @@ let menuBarHeight;
MobileAppBridge.getMenuBarHeight()
.then((_response) => {
menuBarHeight = _response;
+ return;
})
.catch((e) => {
log.error('Failed getting menuBarHeight:', e);
diff --git a/app/lib/rpc-address-file.js b/app/lib/rpc-address-file.js
index 6ff920b8df..f05cc54fdc 100644
--- a/app/lib/rpc-address-file.js
+++ b/app/lib/rpc-address-file.js
@@ -28,7 +28,7 @@ export class RpcAddressFile {
let promise = this._pollPromise;
if (!promise) {
- promise = new Promise((resolve, _reject) => {
+ promise = new Promise((resolve) => {
const timer = setInterval(() => {
fs.exists(this._filePath, (exists) => {
if (exists) {