Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/AuthLoadingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default React.memo(withTheme(({ theme, navigation }) => {
{text && (
<>
<ActivityIndicator color={themes[theme].auxiliaryText} size='large' />
<Text style={[styles.text, { color: themes[theme].bodyText }]}>{`${ text }.\n${ I18n.t('Please_wait') }`}</Text>
<Text style={[styles.text, { color: themes[theme].bodyText }]}>{`${ text }\n${ I18n.t('Please_wait') }`}</Text>
</>
)}
</View>
Expand Down
11 changes: 6 additions & 5 deletions app/views/SettingsView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { SafeAreaView } from 'react-navigation';

import { logout as logoutAction, loginRequest as loginRequestAction } from '../../actions/login';
import { logout as logoutAction } from '../../actions/login';
import { selectServerRequest as selectServerRequestAction } from '../../actions/server';
import { toggleCrashReport as toggleCrashReportAction } from '../../actions/crashReport';
import { SWITCH_TRACK_COLOR, themes } from '../../constants/colors';
import { DrawerButton, CloseModalButton } from '../../containers/HeaderButton';
Expand Down Expand Up @@ -81,7 +82,7 @@ class SettingsView extends React.Component {
theme: PropTypes.string,
split: PropTypes.bool,
logout: PropTypes.func.isRequired,
loginRequest: PropTypes.func,
selectServerRequest: PropTypes.func,
token: PropTypes.string,
appStart: PropTypes.func
}
Expand All @@ -106,11 +107,11 @@ class SettingsView extends React.Component {
callToAction: I18n.t('Clear'),
onPress: async() => {
const {
server: { server }, loginRequest, token, appStart
server: { server }, appStart, selectServerRequest
} = this.props;
await appStart('loading', I18n.t('Clear_cache_loading'));
await RocketChat.clearCache({ server });
await loginRequest({ resume: token }, true);
await selectServerRequest(server, null, true);
}
});
}
Expand Down Expand Up @@ -348,7 +349,7 @@ const mapStateToProps = state => ({

const mapDispatchToProps = dispatch => ({
logout: () => dispatch(logoutAction()),
loginRequest: (...params) => dispatch(loginRequestAction(...params)),
selectServerRequest: params => dispatch(selectServerRequestAction(params)),
toggleCrashReport: params => dispatch(toggleCrashReportAction(params)),
appStart: (...params) => dispatch(appStartAction(...params))
});
Expand Down