From 0b2a44eb0adb30c60c5dad90f69c99b7474a1b3d Mon Sep 17 00:00:00 2001 From: Johannes Vedder Date: Wed, 4 Sep 2024 14:42:45 +0200 Subject: [PATCH 1/2] fix: maybe prevent blank screen in notification debug view --- app/lib/screens/study/dashboard/dashboard.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/lib/screens/study/dashboard/dashboard.dart b/app/lib/screens/study/dashboard/dashboard.dart index 108970a69..50cd6cc99 100644 --- a/app/lib/screens/study/dashboard/dashboard.dart +++ b/app/lib/screens/study/dashboard/dashboard.dart @@ -192,6 +192,11 @@ class _DashboardScreenState extends State ); launchUrl(emailLaunchUri); }, + // text color is white, so we need to set the background color to black + style: ElevatedButton.styleFrom( + backgroundColor: + Theme.of(context).primaryColor, + ), child: const Text('Send via email'), ), FutureBuilder( @@ -203,9 +208,6 @@ class _DashboardScreenState extends State if (snapshot.hasData) { final String data = "ignoreBatteryOptimizations: ${snapshot.data}"; - StudyNotifications - .scheduledNotificationsDebug = - "${StudyNotifications.scheduledNotificationsDebug}\n\n$data\n"; return Text(data); } else { return const CircularProgressIndicator(); @@ -214,7 +216,8 @@ class _DashboardScreenState extends State ), SelectableText( StudyNotifications - .scheduledNotificationsDebug!, + .scheduledNotificationsDebug ?? + 'No data', ), ], ), From 65cf8a4db3a313ff5250f5af7d8a44ccd1cbe0df Mon Sep 17 00:00:00 2001 From: Johannes Vedder Date: Wed, 4 Sep 2024 15:19:00 +0200 Subject: [PATCH 2/2] fix: result history filter --- core/lib/src/models/tables/study_subject.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/lib/src/models/tables/study_subject.dart b/core/lib/src/models/tables/study_subject.dart index 5a2d0136d..8797ab371 100644 --- a/core/lib/src/models/tables/study_subject.dart +++ b/core/lib/src/models/tables/study_subject.dart @@ -376,7 +376,8 @@ class StudySubject extends SupabaseObjectFunctions { return SupabaseQuery.extractSupabaseList( await env.client .from(tableName) - .select('*,study!study_subject_studyId_fkey(*),subject_progress(*)'), + .select('*,study!study_subject_studyId_fkey(*),subject_progress(*)') + .eq('user_id', userId), ); }