TF-2907 Disable YES/NO/MAYBE action for events when missing METHOD/ORGANIZER/ATTENDEES
This commit is contained in:
@@ -356,4 +356,8 @@ extension CalendarEventExtension on CalendarEvent {
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
bool get isDisplayedEventReplyAction => method != null
|
||||
&& organizer != null
|
||||
&& participants?.isNotEmpty == true;
|
||||
}
|
||||
+9
-8
@@ -101,15 +101,16 @@ class CalendarEventDetailWidget extends StatelessWidget {
|
||||
organizer: calendarEvent.organizer!,
|
||||
),
|
||||
),
|
||||
CalendarEventActionButtonWidget(
|
||||
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
||||
calendarEventReplying: calendarEventReplying,
|
||||
presentationEmail: presentationEmail,
|
||||
onMailToAttendeesAction: () => onMailtoAttendeesAction?.call(
|
||||
calendarEvent.organizer,
|
||||
calendarEvent.participants,
|
||||
if (calendarEvent.isDisplayedEventReplyAction)
|
||||
CalendarEventActionButtonWidget(
|
||||
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
||||
calendarEventReplying: calendarEventReplying,
|
||||
presentationEmail: presentationEmail,
|
||||
onMailToAttendeesAction: () => onMailtoAttendeesAction?.call(
|
||||
calendarEvent.organizer,
|
||||
calendarEvent.participants,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
+20
-18
@@ -120,16 +120,17 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
||||
organizer: calendarEvent.organizer!,
|
||||
),
|
||||
),
|
||||
CalendarEventActionButtonWidget(
|
||||
margin: EdgeInsetsDirectional.zero,
|
||||
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
||||
calendarEventReplying: calendarEventReplying,
|
||||
presentationEmail: presentationEmail,
|
||||
onMailToAttendeesAction: () => onMailtoAttendeesAction?.call(
|
||||
calendarEvent.organizer,
|
||||
calendarEvent.participants,
|
||||
if (calendarEvent.isDisplayedEventReplyAction)
|
||||
CalendarEventActionButtonWidget(
|
||||
margin: EdgeInsetsDirectional.zero,
|
||||
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
||||
calendarEventReplying: calendarEventReplying,
|
||||
presentationEmail: presentationEmail,
|
||||
onMailToAttendeesAction: () => onMailtoAttendeesAction?.call(
|
||||
calendarEvent.organizer,
|
||||
calendarEvent.participants,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
@@ -195,16 +196,17 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
||||
organizer: calendarEvent.organizer!,
|
||||
),
|
||||
),
|
||||
CalendarEventActionButtonWidget(
|
||||
margin: EdgeInsetsDirectional.zero,
|
||||
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
||||
calendarEventReplying: calendarEventReplying,
|
||||
presentationEmail: presentationEmail,
|
||||
onMailToAttendeesAction: () => onMailtoAttendeesAction?.call(
|
||||
calendarEvent.organizer,
|
||||
calendarEvent.participants,
|
||||
if (calendarEvent.isDisplayedEventReplyAction)
|
||||
CalendarEventActionButtonWidget(
|
||||
margin: EdgeInsetsDirectional.zero,
|
||||
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
||||
calendarEventReplying: calendarEventReplying,
|
||||
presentationEmail: presentationEmail,
|
||||
onMailToAttendeesAction: () => onMailtoAttendeesAction?.call(
|
||||
calendarEvent.organizer,
|
||||
calendarEvent.participants,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user