mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-19 03:11:38 +03:00
rearranged setting reset events
This commit is contained in:
parent
099d1a4f7f
commit
7ccb36bafa
@ -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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user