Skip to content

Commit

Permalink
fix(replies): filter replies by schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
mforesti authored and borgoat committed Nov 10, 2024
1 parent 50d6116 commit 0858d35
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/selectors/schedules.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 0858d35

Please sign in to comment.