Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ui): Deduplicate remote events conditionnally.
The `Timeline` has its own remote event deduplication mechanism. But we are transitioning to receive updates from the `EventCache` via `VectorDiff`, which are emitted via `RoomEvents`, which already runs its own deduplication mechanism (`matrix_sdk::event_cache::Deduplicator`). Deduplication from the `EventCache` will generate `VectorDiff::Remove` for example. It can create a conflict with the `Timeline` deduplication mechanism. This patch updates the deduplication mechanism from the `Timeline` when adding or updating remote events to be conditionnal: when `TimelineSettings::vectordiffs_as_inputs` is enabled, the deduplication mechanism of the `Timeline` is silent, it does nothing, otherwise it runs.
- Loading branch information