mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Use a static room summary provider to resolve room summaries through id and aliases (#3863)
* trying to debug why sometimes the value is missing even if it appears in the room list * static room provider implementation * set the page size through the init * removed reset filters on .cancel since using the sop function is safer
This commit is contained in:
@@ -17,7 +17,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
private let notificationSettings: NotificationSettingsProxyProtocol
|
||||
private let appSettings: AppSettings
|
||||
|
||||
private let roomListPageSize = 200
|
||||
private let roomListPageSize: UInt32
|
||||
|
||||
private let serialDispatchQueue: DispatchQueue
|
||||
|
||||
@@ -59,6 +59,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
eventStringBuilder: RoomEventStringBuilder,
|
||||
name: String,
|
||||
shouldUpdateVisibleRange: Bool = false,
|
||||
roomListPageSize: UInt32 = 200,
|
||||
notificationSettings: NotificationSettingsProxyProtocol,
|
||||
appSettings: AppSettings) {
|
||||
self.roomListService = roomListService
|
||||
@@ -68,6 +69,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
|
||||
self.shouldUpdateVisibleRange = shouldUpdateVisibleRange
|
||||
self.notificationSettings = notificationSettings
|
||||
self.appSettings = appSettings
|
||||
self.roomListPageSize = roomListPageSize
|
||||
|
||||
diffsPublisher
|
||||
.receive(on: serialDispatchQueue)
|
||||
|
||||
@@ -42,15 +42,18 @@ enum RoomSummaryProviderFilter: Equatable {
|
||||
}
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol RoomSummaryProviderProtocol {
|
||||
protocol StaticRoomSummaryProviderProtocol {
|
||||
/// Publishes the currently available room summaries
|
||||
var roomListPublisher: CurrentValuePublisher<[RoomSummary], Never> { get }
|
||||
|
||||
func setRoomList(_ roomList: RoomList)
|
||||
}
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol RoomSummaryProviderProtocol: StaticRoomSummaryProviderProtocol {
|
||||
/// Publishes the current state the summary provider is finding itself in
|
||||
var statePublisher: CurrentValuePublisher<RoomSummaryProviderState, Never> { get }
|
||||
|
||||
func setRoomList(_ roomList: RoomList)
|
||||
|
||||
|
||||
func updateVisibleRange(_ range: Range<Int>)
|
||||
|
||||
func setFilter(_ filter: RoomSummaryProviderFilter)
|
||||
|
||||
Reference in New Issue
Block a user