From 0858d356359f5945a72b7a2b427d8e11ee38d4ae Mon Sep 17 00:00:00 2001 From: mforesti Date: Sat, 9 Nov 2024 00:23:06 +0100 Subject: [PATCH] fix(replies): filter replies by schedule --- lib/selectors/schedules.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/selectors/schedules.dart b/lib/selectors/schedules.dart index 016d473b..d1b32a0a 100644 --- a/lib/selectors/schedules.dart +++ b/lib/selectors/schedules.dart @@ -25,9 +25,11 @@ ScheduleSummary repliesForScheduleInstance({ ); replies?.forEach( - (reply) => reply.eventDate.copyWith(isUtc: true).isAtSameMomentAs(eventDate) - ? allReplies[reply.memberId] = reply.selectedOption - : null, + (reply) => + reply.eventDate.copyWith(isUtc: true).isAtSameMomentAs(eventDate) && + reply.scheduleId == schedule.id + ? allReplies[reply.memberId] = reply.selectedOption + : null, ); final myReply = allReplies[targetMemberId];