rearranged setting reset events

This commit is contained in:
noumantahir 2022-07-02 03:34:04 +05:00
parent 099d1a4f7f
commit 7ccb36bafa

View File

@ -25,7 +25,6 @@ import THEME_OPTIONS from '../../../constants/options/theme';
// Services // Services
import { import {
getAuthStatus, getAuthStatus,
getExistUser,
getSettings, getSettings,
getUserData, getUserData,
removeUserData, removeUserData,
@ -438,6 +437,7 @@ class ApplicationContainer extends Component {
await this._getUserDataFromRealm(); await this._getUserDataFromRealm();
this._compareAndPromptForUpdate(); this._compareAndPromptForUpdate();
this._registerDeviceForNotifications(); this._registerDeviceForNotifications();
this.props.dispatch(purgeExpiredCache());
}; };
_pushNavigate = (notification) => { _pushNavigate = (notification) => {
@ -757,20 +757,16 @@ class ApplicationContainer extends Component {
_getSettings = async () => { _getSettings = async () => {
const { dispatch, settingsMigrated } = this.props; const { dispatch, settingsMigrated } = this.props;
//TOOD: no need for resetting modal here afer adding them to non persist store. if(settingsMigrated){
return;
}
//reset certain properties //reset certain properties
dispatch(hideActionModal()); dispatch(hideActionModal());
dispatch(hideProfileModal()); dispatch(hideProfileModal());
dispatch(toastNotification('')); dispatch(toastNotification(''));
dispatch(setRcOffer(false)); dispatch(setRcOffer(false));
dispatch(purgeExpiredCache());
if(settingsMigrated){
return;
}
const settings = await getSettings(); const settings = await getSettings();