diff --git a/src/screens/settings/container/settingsContainer.js b/src/screens/settings/container/settingsContainer.js
index ab892502e..40194add1 100644
--- a/src/screens/settings/container/settingsContainer.js
+++ b/src/screens/settings/container/settingsContainer.js
@@ -63,6 +63,7 @@ class SettingsContainer extends Component {
this.state = {
serverList: [],
isNotificationMenuOpen: props.isNotificationSettingsOpen,
+ isLoading: false,
};
}
@@ -114,6 +115,8 @@ class SettingsContainer extends Component {
dispatch(setApi(server));
+ this.setState({ isLoading: true });
+
try {
serverResp = await client.database.getDynamicGlobalProperties();
} catch (e) {
@@ -144,6 +147,7 @@ class SettingsContainer extends Component {
checkClient();
}
+ this.setState({ isLoading: false });
dispatch(toastNotification(intl.formatMessage({ id: alertMessage })));
};
@@ -345,7 +349,7 @@ class SettingsContainer extends Component {
};
render() {
- const { serverList, isNotificationMenuOpen } = this.state;
+ const { serverList, isNotificationMenuOpen, isLoading } = this.state;
return (
);
diff --git a/src/screens/settings/screen/settingsScreen.js b/src/screens/settings/screen/settingsScreen.js
index dd6490543..ba466854d 100644
--- a/src/screens/settings/screen/settingsScreen.js
+++ b/src/screens/settings/screen/settingsScreen.js
@@ -1,5 +1,6 @@
+/* eslint-disable react/jsx-wrap-multilines */
import React, { PureComponent, Fragment } from 'react';
-import { ScrollView, View } from 'react-native';
+import { ScrollView, View, RefreshControl } from 'react-native';
import { injectIntl } from 'react-intl';
// Utils
@@ -31,7 +32,7 @@ class SettingsScreen extends PureComponent {
// Component Life Cycles
// Component Functions
-
+ // TODO: REFACTOR ME !
render() {
const {
handleOnChange,
@@ -53,6 +54,7 @@ class SettingsScreen extends PureComponent {
transfersNotification,
voteNotification,
handleOnButtonPress,
+ isLoading,
} = this.props;
return (
@@ -63,7 +65,18 @@ class SettingsScreen extends PureComponent {
})}
/>
-
+
+ }
+ >