v1.1.26+110 android release
This commit is contained in:
@@ -93,11 +93,10 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
|
||||
accountBloc.add(AccountLogInFinished(customer: Cache().userLoggedIn!));
|
||||
Track().track(TrackingEvent.login, eventValue: "email");
|
||||
Cache().setLoginType(LoginType.email);
|
||||
emit(LoginSuccess());
|
||||
} on Exception catch (e) {
|
||||
emit(LoginError(message: e.toString()));
|
||||
} finally {
|
||||
emit(LoginSuccess());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _onLoginFB(LoginFB event, Emitter<LoginState> emit) async {
|
||||
@@ -107,11 +106,10 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
|
||||
await userRepository.getUserByFB();
|
||||
accountBloc.add(AccountLogInFinished(customer: Cache().userLoggedIn!));
|
||||
Track().track(TrackingEvent.login, eventValue: "FB");
|
||||
emit(LoginSuccess());
|
||||
} on Exception catch (e) {
|
||||
emit(LoginError(message: e.toString()));
|
||||
} finally {
|
||||
emit(LoginSuccess());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _onLoginGoogle(LoginGoogle event, Emitter<LoginState> emit) async {
|
||||
@@ -121,11 +119,10 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
|
||||
await userRepository.getUserByGoogle();
|
||||
accountBloc.add(AccountLogInFinished(customer: Cache().userLoggedIn!));
|
||||
Track().track(TrackingEvent.login, eventValue: "Google");
|
||||
emit(LoginSuccess());
|
||||
} on Exception catch (e) {
|
||||
emit(LoginError(message: e.toString()));
|
||||
} finally {
|
||||
emit(LoginSuccess());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _onLoginApple(LoginApple event, Emitter<LoginState> emit) async {
|
||||
@@ -135,10 +132,9 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
|
||||
await userRepository.getUserByApple();
|
||||
accountBloc.add(AccountLogInFinished(customer: Cache().userLoggedIn!));
|
||||
Track().track(TrackingEvent.login, eventValue: "Apple");
|
||||
emit(LoginSuccess());
|
||||
} on Exception catch (e) {
|
||||
emit(LoginError(message: e.toString()));
|
||||
} finally {
|
||||
emit(LoginSuccess());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,12 +150,14 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
|
||||
customerRepository!.customer!.emailSubscription = emailSubscription == true ? 1 : 0;
|
||||
await afterRegistration("email");
|
||||
Cache().setLoginType(LoginType.email);
|
||||
emit(LoginSuccess());
|
||||
}
|
||||
} on Exception catch (e) {
|
||||
emit(LoginError(message: e.toString()));
|
||||
} finally {
|
||||
emit(LoginSuccess());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void _onRegistrationFB(RegistrationFB event, Emitter<LoginState> emit) async {
|
||||
@@ -170,11 +168,12 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
|
||||
accountBloc.add(AccountLogInFinished(customer: Cache().userLoggedIn!));
|
||||
customerRepository!.customer!.emailSubscription = emailSubscription == true ? 1 : 0;
|
||||
await afterRegistration("FB");
|
||||
emit(LoginSuccess());
|
||||
} on Exception catch (e) {
|
||||
emit(LoginError(message: e.toString()));
|
||||
} finally {
|
||||
emit(LoginSuccess());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void _onRegistrationGoogle(RegistrationGoogle event, Emitter<LoginState> emit) async {
|
||||
@@ -185,11 +184,11 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
|
||||
accountBloc.add(AccountLogInFinished(customer: Cache().userLoggedIn!));
|
||||
customerRepository!.customer!.emailSubscription = emailSubscription == true ? 1 : 0;
|
||||
await afterRegistration("Google");
|
||||
} on Exception catch (e) {
|
||||
emit(LoginError(message: e.toString()));
|
||||
} finally {
|
||||
emit(LoginSuccess());
|
||||
}
|
||||
} on Exception catch (e) {
|
||||
emit(LoginError(message: e.toString()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void _onRegistrationApple(RegistrationApple event, Emitter<LoginState> emit) async {
|
||||
@@ -200,11 +199,10 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> with Trans {
|
||||
accountBloc.add(AccountLogInFinished(customer: Cache().userLoggedIn!));
|
||||
customerRepository!.customer!.emailSubscription = emailSubscription == true ? 1 : 0;
|
||||
await afterRegistration("Apple");
|
||||
emit(LoginSuccess());
|
||||
} on Exception catch (e) {
|
||||
emit(LoginError(message: e.toString()));
|
||||
} finally {
|
||||
emit(LoginSuccess());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _onDataProtectionClicked(DataProtectionClicked event, Emitter<LoginState> emit) async {
|
||||
|
||||
@@ -37,10 +37,9 @@ class SessionBloc extends Bloc<SessionEvent, SessionState> with Logging {
|
||||
resultsFuture.then((results) {
|
||||
print('iTunes results: $results');
|
||||
});
|
||||
emit(SessionReady());
|
||||
} on Exception catch (e) {
|
||||
emit(SessionFailure(message: e.toString()));
|
||||
} finally {
|
||||
emit(SessionReady());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user