core/timeline: Don't excise events from queue

When removing the last subscriber (something that can happen when
closing the main window), GcalTimeline clears the event queue. But
that leaves us in an inconsistent state, as we don't process any of
the potentially removed events.

Don't do that.

Related: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1087
This commit is contained in:
Georges Basile Stavracas Neto
2023-09-13 09:17:12 -03:00
parent f1767037ac
commit a1810433ed
-3
View File
@@ -1072,9 +1072,6 @@ gcal_timeline_remove_subscriber (GcalTimeline *self,
g_signal_handlers_disconnect_by_func (subscriber, on_subscriber_range_changed_cb, self);
g_hash_table_remove (self->subscribers, subscriber);
if (g_hash_table_size (self->subscribers) == 0)
g_queue_clear_full (self->event_queue, (GDestroyNotify) queue_data_free);
gcal_range_tree_remove_data (self->subscriber_ranges, subscriber);
update_range (self);