6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 802bbf82

AuthorMikkel Thygesen<mth@dwarf.dk>
Date2025-02-05 10:55:47 +0100
455: Fixed unaddressed merge conflicts

Changed files

comwell_key_app/lib/authentication/authentication_repository.dart  | 6 +-----
 comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart | 3 +--
 comwell_key_app/lib/utils/seos_repository.dart                     | 7 +++----
 3 files changed, 5 insertions(+), 11 deletions(-)

Diff

diff --git a/comwell_key_app/lib/authentication/authentication_repository.dart b/comwell_key_app/lib/authentication/authentication_repository.dart
index e2fe791f..ad2c179e 100644
--- a/comwell_key_app/lib/authentication/authentication_repository.dart
+++ b/comwell_key_app/lib/authentication/authentication_repository.dart
@@ -28,11 +28,7 @@ class AuthenticationRepository {
void _onAuthResult(AuthenticationStatus status) async {
try {
if (status == AuthenticationStatus.authenticated) {
- final isEndpointSetup = await seos.startMobilePlugin();
- if (!isEndpointSetup) {
- final invitationCode = await api.createEndpointRegistration();
- await seos.setupEndpoint(invitationCode);
- }
+ await seos.startMobilePlugin();
}
} catch (e, st) {
if(kDebugMode) print("e=$e, $st");
diff --git a/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart b/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart
index 26439c2f..0fb9a515 100644
--- a/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart
+++ b/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart
@@ -42,8 +42,7 @@ class BookingDetailsBloc
Future<void> checkMobileKeys(Emitter<BookingDetailsState> emit) async {
try {
- final isEndPointSetup = await seosRepository.startMobilePlugin();
- print("qqq isEndPointSetup=$isEndPointSetup");
+ final isEndPointSetup = await seosRepository.isEndpointSetup();
if (isEndPointSetup) {
final keys = await seosRepository.refreshKeys();
emit(state.updateKeys(keys));
diff --git a/comwell_key_app/lib/utils/seos_repository.dart b/comwell_key_app/lib/utils/seos_repository.dart
index bd3dd61d..255a7aa4 100644
--- a/comwell_key_app/lib/utils/seos_repository.dart
+++ b/comwell_key_app/lib/utils/seos_repository.dart
@@ -12,7 +12,7 @@ class SeosRepository {
final api = Api();
final seosMobileKeysPlugin = locator<SeosMobileKeysPlugin>();
- Future<bool> startMobilePlugin() async {
+ Future<void> startMobilePlugin() async {
final mobileKeysOptions = {
"MobileKeysOptionApplicationId":
dotenv.env['MOBILEKEYSOPTIONAPPLICATIONID'],
@@ -80,9 +80,8 @@ class SeosRepository {
}
Future<void> setupEndpoint() async {
- //final invitationCode = await api.createEndpointRegistration();
- //print("qqq invCode=$invitationCode");
- await seosMobileKeysPlugin.setupEndpoint("BC63-2BXN-MRPD-XZHR");
+ final invitationCode = await api.createEndpointRegistration();
+ await seosMobileKeysPlugin.setupEndpoint(invitationCode);
}
Future<List<MobileKeysKey>> refreshKeys() async {