Skip to content

Commit

Permalink
set the page size through the init
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Mar 3, 2025
1 parent 9a1994e commit 2210ecc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ElementX/Sources/Services/Client/ClientProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ class ClientProxy: ClientProxyProtocol {
staticRoomSummaryProvider = RoomSummaryProvider(roomListService: roomListService,
eventStringBuilder: eventStringBuilder,
name: "StaticAllRooms",
roomListPageSize: .max,
notificationSettings: notificationSettings,
appSettings: appSettings)
try await staticRoomSummaryProvider?.setRoomList(roomListService.allRooms())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -59,6 +59,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
eventStringBuilder: RoomEventStringBuilder,
name: String,
shouldUpdateVisibleRange: Bool = false,
roomListPageSize: UInt32 = 200,
notificationSettings: NotificationSettingsProxyProtocol,
appSettings: AppSettings) {
self.roomListService = roomListService
Expand All @@ -68,6 +69,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
self.shouldUpdateVisibleRange = shouldUpdateVisibleRange
self.notificationSettings = notificationSettings
self.appSettings = appSettings
self.roomListPageSize = roomListPageSize

diffsPublisher
.receive(on: serialDispatchQueue)
Expand Down

0 comments on commit 2210ecc

Please sign in to comment.