diff --git a/lib/features/email/presentation/extensions/calendar_event_extension.dart b/lib/features/email/presentation/extensions/calendar_event_extension.dart index 1c7868b401..aec40e3ca0 100644 --- a/lib/features/email/presentation/extensions/calendar_event_extension.dart +++ b/lib/features/email/presentation/extensions/calendar_event_extension.dart @@ -356,4 +356,8 @@ extension CalendarEventExtension on CalendarEvent { } return []; } + + bool get isDisplayedEventReplyAction => method != null + && organizer != null + && participants?.isNotEmpty == true; } \ No newline at end of file diff --git a/lib/features/email/presentation/widgets/calendar_event/calendar_event_detail_widget.dart b/lib/features/email/presentation/widgets/calendar_event/calendar_event_detail_widget.dart index c571072b55..89f509a52a 100644 --- a/lib/features/email/presentation/widgets/calendar_event/calendar_event_detail_widget.dart +++ b/lib/features/email/presentation/widgets/calendar_event/calendar_event_detail_widget.dart @@ -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, + ), ], ), ); diff --git a/lib/features/email/presentation/widgets/calendar_event/calendar_event_information_widget.dart b/lib/features/email/presentation/widgets/calendar_event/calendar_event_information_widget.dart index 852d6566de..76b7cb294d 100644 --- a/lib/features/email/presentation/widgets/calendar_event/calendar_event_information_widget.dart +++ b/lib/features/email/presentation/widgets/calendar_event/calendar_event_information_widget.dart @@ -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, + ), ], ), ) @@ -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, + ), ], ), ))