Skip to content

Commit

Permalink
TF-2907 Disable YES/NO/MAYBE action for events when missing `METHOD…
Browse files Browse the repository at this point in the history
…/ORGANIZER/ATTENDEES`
  • Loading branch information
dab246 committed Jun 7, 2024
1 parent 0e57da5 commit 4b552a6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,8 @@ extension CalendarEventExtension on CalendarEvent {
}
return [];
}

bool get isDisplayedEventReplyAction => method != null
&& organizer != null
&& participants?.isNotEmpty == true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ class CalendarEventDetailWidget extends StatelessWidget {
organizer: calendarEvent.organizer!,
),
),
CalendarEventActionButtonWidget(
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
calendarEventReplying: calendarEventReplying,
presentationEmail: presentationEmail,
),
if (calendarEvent.isDisplayedEventReplyAction)
CalendarEventActionButtonWidget(
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
calendarEventReplying: calendarEventReplying,
presentationEmail: presentationEmail,
),
],
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ class CalendarEventInformationWidget extends StatelessWidget {
organizer: calendarEvent.organizer!,
),
),
CalendarEventActionButtonWidget(
margin: EdgeInsetsDirectional.zero,
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
calendarEventReplying: calendarEventReplying,
presentationEmail: presentationEmail,
),
if (calendarEvent.isDisplayedEventReplyAction)
CalendarEventActionButtonWidget(
margin: EdgeInsetsDirectional.zero,
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
calendarEventReplying: calendarEventReplying,
presentationEmail: presentationEmail,
),
],
),
)
Expand Down Expand Up @@ -188,12 +189,13 @@ class CalendarEventInformationWidget extends StatelessWidget {
organizer: calendarEvent.organizer!,
),
),
CalendarEventActionButtonWidget(
margin: EdgeInsetsDirectional.zero,
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
calendarEventReplying: calendarEventReplying,
presentationEmail: presentationEmail,
),
if (calendarEvent.isDisplayedEventReplyAction)
CalendarEventActionButtonWidget(
margin: EdgeInsetsDirectional.zero,
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
calendarEventReplying: calendarEventReplying,
presentationEmail: presentationEmail,
),
],
),
))
Expand Down

0 comments on commit 4b552a6

Please sign in to comment.