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 [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get isDisplayedEventReplyAction => method != null
|
||||||
|
&& organizer != null
|
||||||
|
&& participants?.isNotEmpty == true;
|
||||||
}
|
}
|
||||||
+1
@@ -101,6 +101,7 @@ class CalendarEventDetailWidget extends StatelessWidget {
|
|||||||
organizer: calendarEvent.organizer!,
|
organizer: calendarEvent.organizer!,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (calendarEvent.isDisplayedEventReplyAction)
|
||||||
CalendarEventActionButtonWidget(
|
CalendarEventActionButtonWidget(
|
||||||
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
||||||
calendarEventReplying: calendarEventReplying,
|
calendarEventReplying: calendarEventReplying,
|
||||||
|
|||||||
+2
@@ -120,6 +120,7 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
|||||||
organizer: calendarEvent.organizer!,
|
organizer: calendarEvent.organizer!,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (calendarEvent.isDisplayedEventReplyAction)
|
||||||
CalendarEventActionButtonWidget(
|
CalendarEventActionButtonWidget(
|
||||||
margin: EdgeInsetsDirectional.zero,
|
margin: EdgeInsetsDirectional.zero,
|
||||||
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
||||||
@@ -195,6 +196,7 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
|||||||
organizer: calendarEvent.organizer!,
|
organizer: calendarEvent.organizer!,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (calendarEvent.isDisplayedEventReplyAction)
|
||||||
CalendarEventActionButtonWidget(
|
CalendarEventActionButtonWidget(
|
||||||
margin: EdgeInsetsDirectional.zero,
|
margin: EdgeInsetsDirectional.zero,
|
||||||
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
onCalendarEventReplyActionClick: onCalendarEventReplyActionClick,
|
||||||
|
|||||||
Reference in New Issue
Block a user