mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Update the SDK and enable event permalinks. (#2748)
This commit is contained in:
+4
-4
@@ -36,7 +36,7 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
||||
private var client: UITestsSignalling.Client?
|
||||
|
||||
init(listenForSignals: Bool = false) {
|
||||
callbacks.send(.paginationState(PaginationState(backward: .idle, forward: .timelineStartReached)))
|
||||
callbacks.send(.paginationState(PaginationState(backward: .idle, forward: .timelineEndReached)))
|
||||
callbacks.send(.isLive(true))
|
||||
|
||||
guard listenForSignals else { return }
|
||||
@@ -62,7 +62,7 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
||||
}
|
||||
|
||||
func paginateBackwards(requestSize: UInt16) async -> Result<Void, RoomTimelineControllerError> {
|
||||
callbacks.send(.paginationState(PaginationState(backward: .paginating, forward: .timelineStartReached)))
|
||||
callbacks.send(.paginationState(PaginationState(backward: .paginating, forward: .timelineEndReached)))
|
||||
|
||||
if client == nil {
|
||||
try? await simulateBackPagination()
|
||||
@@ -173,8 +173,8 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
|
||||
/// Prepends the next chunk of items to the `timelineItems` array.
|
||||
private func simulateBackPagination() async throws {
|
||||
defer {
|
||||
callbacks.send(.paginationState(PaginationState(backward: backPaginationResponses.isEmpty ? .timelineStartReached : .idle,
|
||||
forward: .timelineStartReached)))
|
||||
callbacks.send(.paginationState(PaginationState(backward: backPaginationResponses.isEmpty ? .timelineEndReached : .idle,
|
||||
forward: .timelineEndReached)))
|
||||
}
|
||||
|
||||
guard !backPaginationResponses.isEmpty else { return }
|
||||
|
||||
@@ -321,7 +321,7 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
|
||||
// Check if we need to add anything to the top of the timeline.
|
||||
switch paginationState.backward {
|
||||
case .timelineStartReached:
|
||||
case .timelineEndReached:
|
||||
if !roomProxy.isEncryptedOneToOneRoom {
|
||||
let timelineStart = TimelineStartRoomTimelineItem(name: roomProxy.name)
|
||||
newTimelineItems.insert(timelineStart, at: 0)
|
||||
@@ -335,7 +335,7 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
switch paginationState.forward {
|
||||
case .paginating:
|
||||
newTimelineItems.insert(PaginationIndicatorRoomTimelineItem(position: .end), at: newTimelineItems.count)
|
||||
case .idle, .timelineStartReached:
|
||||
case .idle, .timelineEndReached:
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user