Add notification-count, highligh and has-notifications properties to the
sidebar section model and signal on corresponding changes.
Aggregation is done as follows:
is-read := conjunction_over_all_rooms_in_section(is-read)
highligh := union_over_rooms_in_section(highligh)
has-notification := any_over_rooms(has-notifications)
notification-count := sum_over_rooms_in_section(notification-count)
Functionality of ExpressionList is reused on one of the intermediate
models to populate watches (internally on the underlying model) and signal
change of notification-count or highlight with the room indices.
This implementation recalculates the aggregate expressions via
naive iterations (discarding exactly which room(s)' values were
changed).
UI state bits are reflected accordingly to consume the signalled changes.
Fixes: #1048
It is now basically the new EventRow, since only events have a context
menu.
All the widgets that can be direct children of GtkListItem use the
`room-history-row` class for CSS styling.
The main goal here is to move safety-related settings to a new tab so
we can add more in the future.
Since we do not want more tabs, we have to:
- Move the sessions to a subpage accessible with a button in the
"General" tab. While we are here, we reorder most of this tab.
- Move the settings that were in the "Privacy" section of the "Security"
tab to a new "Safety" tab.
- Rename the "Security" tab to "Encryption", to avoid confusion between
"Security" and "Safety".
It requires a few changes during login to only offer SSO when OIDC
compatability is detected,
and most actions that require UIAA in account details must now occur
in the account management UI of MAS.
When there is no subtitle, use the default button padding an use
gtk::Align::Center for valign.
When there is a subtitle, remove the button padding, reduce the space
taken by the labels and use gtk::Align::Fill for valign.
Co-authored-by: Alexandre Franke <afranke@gnome.org>
AdwPreferencesPage only allows AdwPreferencesGroup as children so only
provide that.
We only use the GtkStack for the other active sessions by initializing
the current session early.
Includes other refactoring around user sessions.
Rename CategoryType to SidebarSectionName and remove unused variants.
Rename CategoryFilter to RoomCategoryFilter.
Use Option<RoomCategory> instead of CategoryType for drag-n-drop
operations, preventing us from using GObject properties.