diff --git a/app/init/global_event_handler.js b/app/init/global_event_handler.js index 40ee9a3d5..8b4e002d9 100644 --- a/app/init/global_event_handler.js +++ b/app/init/global_event_handler.js @@ -169,7 +169,7 @@ class GlobalEventHandler { resetMomentLocale(); // TODO: Handle when multi-server support is added - CookieManager.clearAll(Platform.OS === 'ios'); + await CookieManager.clearAll(Platform.OS === 'ios'); PushNotifications.clearNotifications(); const cacheDir = RNFetchBlob.fs.dirs.CacheDir; const mainPath = cacheDir.split('/').slice(0, -1).join('/'); diff --git a/app/screens/login_options/login_options.js b/app/screens/login_options/login_options.js index 5b18b61c3..f4cdcd92b 100644 --- a/app/screens/login_options/login_options.js +++ b/app/screens/login_options/login_options.js @@ -7,6 +7,7 @@ import {intlShape} from 'react-intl'; import { Dimensions, Image, + Platform, ScrollView, StyleSheet, Text, @@ -45,19 +46,19 @@ export default class LoginOptions extends PureComponent { Dimensions.removeEventListener('change', this.orientationDidChange); } - goToLogin = preventDoubleTap(() => { + goToLogin = preventDoubleTap(async () => { const {intl} = this.context; const screen = 'Login'; const title = intl.formatMessage({id: 'mobile.routes.login', defaultMessage: 'Login'}); - CookieManager.clearAll(true); + await CookieManager.clearAll(Platform.OS === 'ios'); goToScreen(screen, title); }); - goToSSO = (ssoType) => { + goToSSO = async (ssoType) => { const {intl} = this.context; const screen = 'SSO'; const title = intl.formatMessage({id: 'mobile.routes.sso', defaultMessage: 'Single Sign-On'}); - CookieManager.clearAll(true); + await CookieManager.clearAll(Platform.OS === 'ios'); goToScreen(screen, title, {ssoType}); };