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, message: AppLocalization.of(context).logout,
context: context, context: context,
callback: () async { callback: () async {
if (store.state.user.isConnectedToGoogle) {
await googleSignOut();
}
store.dispatch(UserLogout(context)); store.dispatch(UserLogout(context));
if (store.state.user.isConnectedToGoogle) {
googleSignOut();
}
}); });
}, },
onCompanyChanged: onCompanyChanged:

View File

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

View File

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