event-editor: Reuse attendees list model in subviews

Store a list model of attendees inside the event editor dialog and use
this model when displaying the details page. The attendees section (like
other sections) gets injected with the event and gets another copy of
the attendees from the event. Both the section and the details page can
now avoid resetting themselves when the underlying data (event) doesn't
change. Note: the details page uses a ListBox for the sake of the UI
style, which can underperform with a lot of attendees (building the
visual tree can be laggy).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/671>
This commit is contained in:
mindonwarp
2026-01-21 19:37:55 +00:00
committed by Marge Bot
parent e7d10964e8
commit 79a37917c7
4 changed files with 34 additions and 37 deletions
@@ -63,9 +63,6 @@ static void
reset_section (GcalAttendeesSection *self,
GcalEvent *event)
{
if (event == self->event)
return;
g_set_object (&self->event, event);
g_list_store_remove_all (self->attendees);
@@ -81,6 +78,9 @@ gcal_attendees_section_set_event (GcalEventEditorSection *section,
GcalEventOrganizer *organizer;
g_autoptr (GSList) attendees = NULL;
if (event == self->event)
return;
reset_section (self, event);
if (self->event == NULL)