From dc0d22475e794d33ceef50732658fa9013e85898 Mon Sep 17 00:00:00 2001 From: manuroe Date: Wed, 4 Jan 2023 10:24:04 +0100 Subject: [PATCH] Avoid the "Failed to load messages" popup when all messages have been loaded --- .../Timeline/TimelineController/RoomTimelineController.swift | 5 ++++- changelog.d/pr-399.bugfix | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/pr-399.bugfix diff --git a/ElementX/Sources/Services/Timeline/TimelineController/RoomTimelineController.swift b/ElementX/Sources/Services/Timeline/TimelineController/RoomTimelineController.swift index ac0f1dca83..00959eaf49 100644 --- a/ElementX/Sources/Services/Timeline/TimelineController/RoomTimelineController.swift +++ b/ElementX/Sources/Services/Timeline/TimelineController/RoomTimelineController.swift @@ -82,7 +82,10 @@ class RoomTimelineController: RoomTimelineControllerProtocol { switch await timelineProvider.paginateBackwards(count) { case .success: return .success(()) - case .failure: + case .failure(let error): + if error == .noMoreMessagesToBackPaginate { + return .success(()) + } return .failure(.generic) } } diff --git a/changelog.d/pr-399.bugfix b/changelog.d/pr-399.bugfix new file mode 100644 index 0000000000..e55ce594af --- /dev/null +++ b/changelog.d/pr-399.bugfix @@ -0,0 +1 @@ +Avoid the "Failed to load messages" popup when all messages have been loaded. \ No newline at end of file