session: Set lazy-loading on state events instead of the timeline

Element does enable it only for state events and for timeline no speed
improvment can be observed.

fixes: https://gitlab.gnome.org/GNOME/fractal/-/issues/768
This commit is contained in:
Julian Sparber 2021-05-05 19:55:19 +02:00
parent 86b753cb4a
commit 863b5125f9

View file

@ -239,12 +239,13 @@ impl Session {
if success {
// TODO: only create the filter once and reuse it in the future
let room_event_filter = assign!(RoomEventFilter::default(), {
lazy_load_options: LazyLoadOptions::Enabled {include_redundant_members: false},
});
let filter = assign!(FilterDefinition::default(), {
room: assign!(RoomFilter::empty(), {
include_leave: true,
timeline: assign!(RoomEventFilter::default(), {
lazy_load_options: LazyLoadOptions::Enabled {include_redundant_members: false},
}),
state: room_event_filter,
}),
});