Fixed login issue

This commit is contained in:
Mustafa Buyukcelebi 2019-08-13 11:41:31 +03:00
parent 0d674d97af
commit 7081accef6
2 changed files with 3 additions and 1 deletions

View File

@ -85,6 +85,7 @@ export const login = async (username, password, isPinCodeOpen) => {
const updatedUserData = await getUpdatedUserData(userData, resData); const updatedUserData = await getUpdatedUserData(userData, resData);
account.local = updatedUserData; account.local = updatedUserData;
account.local.avatar = avatar;
} }
const authData = { const authData = {
@ -94,7 +95,7 @@ export const login = async (username, password, isPinCodeOpen) => {
await setAuthStatus(authData); await setAuthStatus(authData);
// Save user data to Realm DB // Save user data to Realm DB
await setUserData(userData); await setUserData(account.local);
await updateCurrentUsername(account.name); await updateCurrentUsername(account.name);
return { ...account, password }; return { ...account, password };
} }

View File

@ -476,6 +476,7 @@ class ApplicationContainer extends Component {
return realmObject[0]; return realmObject[0];
} }
dispatch(updateCurrentAccount({}));
dispatch(activeApplication()); dispatch(activeApplication());
dispatch(isLoginDone()); dispatch(isLoginDone());