Correct logo

This commit is contained in:
Hillel Coren 2021-03-10 06:46:17 +02:00
parent 2580fded14
commit 85d8e38c0f
3 changed files with 5 additions and 9 deletions

View File

@ -73,10 +73,10 @@ class MenuDrawerVM {
message: AppLocalization.of(context).logout,
context: context,
callback: () async {
if (store.state.user.isConnectedToGoogle) {
await googleSignOut();
}
store.dispatch(UserLogout(context));
if (store.state.user.isConnectedToGoogle) {
googleSignOut();
}
});
},
onCompanyChanged:

View File

@ -79,8 +79,7 @@ class UserDetailsVM {
callback: () {
passwordCallback(
context: context,
callback: (password, idToken) async {
await googleSignOut();
callback: (password, idToken) {
store.dispatch(
SaveAuthUserRequest(
user: state.user.rebuild((b) => b..oauthProvider = ''),
@ -89,6 +88,7 @@ class UserDetailsVM {
completer: completer,
),
);
googleSignOut();
});
});
},

View File

@ -31,9 +31,5 @@ void googleSignUp(Function(String, String, String) callback) async {
}
Future<GoogleSignInAccount> googleSignOut() async {
if (!await _googleSignIn.isSignedIn()) {
return null;
}
return await _googleSignIn.signOut();
}