v1.1.26+110 android release

This commit is contained in:
Tibor Bossanyi (Freelancer)
2022-11-13 21:26:27 +01:00
parent 6ef311286c
commit cbaa1a5b81
9 changed files with 77 additions and 118 deletions
+22 -24
View File
@@ -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 {
+1 -2
View File
@@ -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());
}
}