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.cancel:
|
||||
case EventMethod.declineCounter:
|
||||
return getOrganizerName(context);
|
||||
return getOrganizerNameEvent(context);
|
||||
case EventMethod.reply:
|
||||
case EventMethod.counter:
|
||||
return getAttendeeName(context, listEmailAddressSender);
|
||||
return getAttendeeNameEvent(context, listEmailAddressSender);
|
||||
default:
|
||||
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);
|
||||
if (matchedAttendee != null) {
|
||||
return matchedAttendee.name?.name ?? AppLocalizations.of(context).anAttendee;
|
||||
|
||||
+2
-2
@@ -71,7 +71,7 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: calendarEvent.organizer?.name,
|
||||
text: calendarEvent.organizerName,
|
||||
style: const TextStyle(
|
||||
color: CalendarEventInformationWidgetStyles.invitationMessageColor,
|
||||
fontSize: CalendarEventInformationWidgetStyles.invitationMessageTextSize,
|
||||
@@ -136,7 +136,7 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: calendarEvent.organizer?.name,
|
||||
text: calendarEvent.organizerName,
|
||||
style: const TextStyle(
|
||||
color: CalendarEventInformationWidgetStyles.invitationMessageColor,
|
||||
fontSize: CalendarEventInformationWidgetStyles.invitationMessageTextSize,
|
||||
|
||||
Reference in New Issue
Block a user