TF-2068 Display organizer address when organizer name
(cherry picked from commit f0e0670b798e3d751ced6ce5040b458b1ad10f04)
This commit is contained in:
@@ -121,18 +121,20 @@ extension CalendarEventExtension on CalendarEvent {
|
|||||||
case EventMethod.refresh:
|
case EventMethod.refresh:
|
||||||
case EventMethod.cancel:
|
case EventMethod.cancel:
|
||||||
case EventMethod.declineCounter:
|
case EventMethod.declineCounter:
|
||||||
return getOrganizerName(context);
|
return getOrganizerNameEvent(context);
|
||||||
case EventMethod.reply:
|
case EventMethod.reply:
|
||||||
case EventMethod.counter:
|
case EventMethod.counter:
|
||||||
return getAttendeeName(context, listEmailAddressSender);
|
return getAttendeeNameEvent(context, listEmailAddressSender);
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String getOrganizerName(BuildContext context) => organizer?.name ?? AppLocalizations.of(context).you;
|
String getOrganizerNameEvent(BuildContext context) => organizer?.name ?? AppLocalizations.of(context).you;
|
||||||
|
|
||||||
String getAttendeeName(BuildContext context, List<String> listEmailAddressSender) {
|
String get organizerName => organizer?.name ?? organizer?.mailto?.value ?? '';
|
||||||
|
|
||||||
|
String getAttendeeNameEvent(BuildContext context, List<String> listEmailAddressSender) {
|
||||||
final matchedAttendee = findAttendeeHasUpdatedStatus(listEmailAddressSender);
|
final matchedAttendee = findAttendeeHasUpdatedStatus(listEmailAddressSender);
|
||||||
if (matchedAttendee != null) {
|
if (matchedAttendee != null) {
|
||||||
return matchedAttendee.name?.name ?? AppLocalizations.of(context).anAttendee;
|
return matchedAttendee.name?.name ?? AppLocalizations.of(context).anAttendee;
|
||||||
|
|||||||
+2
-2
@@ -71,7 +71,7 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: calendarEvent.organizer?.name,
|
text: calendarEvent.organizerName,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: CalendarEventInformationWidgetStyles.invitationMessageColor,
|
color: CalendarEventInformationWidgetStyles.invitationMessageColor,
|
||||||
fontSize: CalendarEventInformationWidgetStyles.invitationMessageTextSize,
|
fontSize: CalendarEventInformationWidgetStyles.invitationMessageTextSize,
|
||||||
@@ -136,7 +136,7 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: calendarEvent.organizer?.name,
|
text: calendarEvent.organizerName,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: CalendarEventInformationWidgetStyles.invitationMessageColor,
|
color: CalendarEventInformationWidgetStyles.invitationMessageColor,
|
||||||
fontSize: CalendarEventInformationWidgetStyles.invitationMessageTextSize,
|
fontSize: CalendarEventInformationWidgetStyles.invitationMessageTextSize,
|
||||||
|
|||||||
Reference in New Issue
Block a user