From 9e8c0855c88036b7d6572725e4545d0f3337fc8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20E=2E=20Bermonti-P=C3=A9rez?= Date: Thu, 5 Sep 2024 09:08:43 -0400 Subject: [PATCH 1/3] improve: Use participant controller in cognition --- lib/src/services/run_session.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/src/services/run_session.dart b/lib/src/services/run_session.dart index ad9143e..575dfcb 100644 --- a/lib/src/services/run_session.dart +++ b/lib/src/services/run_session.dart @@ -1,9 +1,7 @@ import 'package:digit_span_tasks/digit_span_tasks.dart'; -import 'package:firebase_auth/firebase_auth.dart'; import 'package:get/get.dart'; import 'package:mdigit_span_tasks_ema/src/auth/participant.dart'; import 'package:mdigit_span_tasks_ema/src/data_manager/session_id_creator.dart'; -import 'package:mdigit_span_tasks_ema/src/auth/auth.dart'; import 'package:mdigit_span_tasks_ema/src/digit_span_tasks/config/config.dart'; import 'package:mdigit_span_tasks_ema/src/services/data_processor.dart'; @@ -14,8 +12,7 @@ Future runSession({ required Function taskRunner, }) async { final DigitSpanTaskConfig config = Get.find(); - final Participant participant = - await Auth(auth: FirebaseAuth.instance).signIn(); + final Participant participant = Get.find(); config.participantID = participant.id; /// We use the startTime for the practice session to create a single From c7a1a22b4e2ba0fb0861f5b0e25d6319dc98f0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20E=2E=20Bermonti-P=C3=A9rez?= Date: Thu, 5 Sep 2024 09:10:10 -0400 Subject: [PATCH 2/3] improve: Insert participant controller permanently --- lib/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 6181865..940dbe4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -22,7 +22,7 @@ Future main() async { Get.put(FirebaseNotifications()); final Participant participant = await Auth(auth: FirebaseAuth.instance).signIn(); - Get.put(participant); + Get.put(participant, permanent: true); Get.put(DigitSpanTaskConfig(), permanent: true); runApp(const MyApp()); } From bffc08f996a4b11e7b6a594187a612215ed60cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20E=2E=20Bermonti-P=C3=A9rez?= Date: Thu, 5 Sep 2024 09:15:17 -0400 Subject: [PATCH 3/3] maint: Remove deprecated survey code --- lib/main.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 940dbe4..89af1a7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -17,7 +17,6 @@ Future main() async { options: DefaultFirebaseOptions.currentPlatform, ); await GetStorage.init(); - GetStorage().remove('baselineCompleted'); Get.put(LocalNotifications()); Get.put(FirebaseNotifications()); final Participant participant =