Bump SDK version and fix breaking changes. (#709)

This commit is contained in:
Doug
2023-03-20 18:26:07 +00:00
committed by GitHub
parent efdb47a98a
commit 66651c0f34
8 changed files with 23 additions and 22 deletions
@@ -35,11 +35,11 @@ class MockRoomSummaryProvider: RoomSummaryProviderProtocol {
switch state {
case .loading:
roomListPublisher = .init([])
statePublisher = .init(.cold)
statePublisher = .init(.notLoaded)
countPublisher = .init(0)
case .loaded:
roomListPublisher = .init(Self.rooms)
statePublisher = .init(.live)
statePublisher = .init(.fullyLoaded)
countPublisher = .init(UInt(Self.rooms.count))
}
}
@@ -26,7 +26,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
private var cancellables = Set<AnyCancellable>()
let roomListPublisher = CurrentValueSubject<[RoomSummary], Never>([])
let statePublisher = CurrentValueSubject<RoomSummaryProviderState, Never>(.cold)
let statePublisher = CurrentValueSubject<RoomSummaryProviderState, Never>(.notLoaded)
let countPublisher = CurrentValueSubject<UInt, Never>(0)
private var rooms: [RoomSummary] = [] {
@@ -220,14 +220,14 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol {
extension RoomSummaryProviderState {
init(slidingSyncState: SlidingSyncState) {
switch slidingSyncState {
case .cold:
self = .cold
case .preload:
self = .preload
case .catchingUp:
self = .catchingUp
case .live:
self = .live
case .notLoaded:
self = .notLoaded
case .preloaded:
self = .preloaded
case .partiallyLoaded:
self = .partiallyLoaded
case .fullyLoaded:
self = .fullyLoaded
}
}
}
@@ -19,10 +19,10 @@ import Foundation
import MatrixRustSDK
enum RoomSummaryProviderState {
case cold
case preload
case catchingUp
case live
case notLoaded
case preloaded
case partiallyLoaded
case fullyLoaded
}
enum RoomSummary: CustomStringConvertible {