Better document the various protocols and classes involved in dealing with room timelines.

This commit is contained in:
Stefan Ceriu
2025-05-23 10:29:19 +03:00
committed by Stefan Ceriu
parent 972084aaf7
commit 29cfcb0b85
4 changed files with 19 additions and 2 deletions
@@ -27,8 +27,10 @@ struct PaginationState: Equatable {
let forward: PaginationStatus
}
/// Entities implementing this protocol are responsible for processings diffs coming from the rust timeline
/// and converting them into an array of Element X specific ``TimelineItemProxy``s that will be
/// published as an array together with the pagination state through the ``updatePublisher``.
@MainActor
// sourcery: AutoMockable
protocol TimelineItemProviderProtocol {
/// A publisher that signals when ``itemProxies`` or ``paginationState`` are changed.
var updatePublisher: AnyPublisher<([TimelineItemProxy], PaginationState), Never> { get }
@@ -43,3 +45,6 @@ protocol TimelineItemProviderProtocol {
/// This is temporary and will be replace by a subscription on the room itself.
var membershipChangePublisher: AnyPublisher<Void, Never> { get }
}
// sourcery: AutoMockable
extension TimelineItemProviderProtocol { }