diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 969aaa0c8..39780d3e4 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -95,8 +95,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/matrix-org/matrix-rust-components-swift", "state" : { - "revision" : "6e9c8b7f0f68fd8e617e9d6c1ad902736899557a", - "version" : "1.0.46-alpha" + "revision" : "cc68dbd95a35a481a7398e7cc324e26917fd4022", + "version" : "1.0.47-alpha" } }, { diff --git a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift index fe1e26227..56b870d50 100644 --- a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift +++ b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift @@ -72,8 +72,8 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol .sink { [weak self] roomSummaryProviderState, totalCount, rooms in guard let self else { return } - let isLoadingData = roomSummaryProviderState != .live && (totalCount == 0 || rooms.count != totalCount) - let hasNoRooms = roomSummaryProviderState == .live && totalCount == 0 + let isLoadingData = roomSummaryProviderState != .fullyLoaded && (totalCount == 0 || rooms.count != totalCount) + let hasNoRooms = roomSummaryProviderState == .fullyLoaded && totalCount == 0 var roomListMode = self.state.roomListMode if isLoadingData { @@ -269,7 +269,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol } private func updateVisibleRange(_ range: Range, timelineLimit: UInt) { - guard visibleRoomsSummaryProvider?.statePublisher.value == .live, + guard visibleRoomsSummaryProvider?.statePublisher.value == .fullyLoaded, !range.isEmpty else { return } guard let visibleRoomsSummaryProvider else { diff --git a/ElementX/Sources/Services/Client/SlidingSyncViewProxy.swift b/ElementX/Sources/Services/Client/SlidingSyncViewProxy.swift index a6a895af0..09ace40c0 100644 --- a/ElementX/Sources/Services/Client/SlidingSyncViewProxy.swift +++ b/ElementX/Sources/Services/Client/SlidingSyncViewProxy.swift @@ -23,7 +23,7 @@ private class SlidingSyncViewObserver: SlidingSyncListRoomListObserver, SlidingS let roomListDiffPublisher = PassthroughSubject() /// Publishes the current state of sliding sync, such as whether its catching up or live. - let stateUpdatePublisher = CurrentValueSubject(.cold) + let stateUpdatePublisher = CurrentValueSubject(.fullyLoaded) /// Publishes the number of available rooms let countUpdatePublisher = CurrentValueSubject(0) diff --git a/ElementX/Sources/Services/Room/RoomSummary/MockRoomSummaryProvider.swift b/ElementX/Sources/Services/Room/RoomSummary/MockRoomSummaryProvider.swift index d4dae9fb1..4414a911b 100644 --- a/ElementX/Sources/Services/Room/RoomSummary/MockRoomSummaryProvider.swift +++ b/ElementX/Sources/Services/Room/RoomSummary/MockRoomSummaryProvider.swift @@ -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)) } } diff --git a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift index b93807b5a..ba65d4ece 100644 --- a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift +++ b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift @@ -26,7 +26,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol { private var cancellables = Set() let roomListPublisher = CurrentValueSubject<[RoomSummary], Never>([]) - let statePublisher = CurrentValueSubject(.cold) + let statePublisher = CurrentValueSubject(.notLoaded) let countPublisher = CurrentValueSubject(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 } } } diff --git a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProviderProtocol.swift b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProviderProtocol.swift index 543f347dd..bcc7e75be 100644 --- a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProviderProtocol.swift +++ b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProviderProtocol.swift @@ -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 { diff --git a/changelog.d/709.change b/changelog.d/709.change new file mode 100644 index 000000000..6427ab515 --- /dev/null +++ b/changelog.d/709.change @@ -0,0 +1 @@ +Bump SDK version and fix breaking changes. \ No newline at end of file diff --git a/project.yml b/project.yml index 238557760..f712518f8 100644 --- a/project.yml +++ b/project.yml @@ -42,7 +42,7 @@ include: packages: MatrixRustSDK: url: https://github.com/matrix-org/matrix-rust-components-swift - exactVersion: 1.0.46-alpha + exactVersion: 1.0.47-alpha # path: ../matrix-rust-sdk DesignKit: path: DesignKit