From 699e99b021c0f93870aedacf80586e04a71740d5 Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Tue, 15 Mar 2022 16:15:38 +0300 Subject: [PATCH 1/3] Reload thread screen for the first message --- Riot/Modules/Room/DataSources/RoomDataSource.m | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Riot/Modules/Room/DataSources/RoomDataSource.m b/Riot/Modules/Room/DataSources/RoomDataSource.m index 2b4569fba..5e91b0d51 100644 --- a/Riot/Modules/Room/DataSources/RoomDataSource.m +++ b/Riot/Modules/Room/DataSources/RoomDataSource.m @@ -968,11 +968,6 @@ const CGFloat kTypingCellHeight = 24; - (void)threadingService:(MXThreadingService *)service didCreateNewThread:(MXThread *)thread direction:(MXTimelineDirection)direction { - if (self.threadId) - { - // no need to reload the thread screen - return; - } if (direction == MXTimelineDirectionBackwards) { // no need to reload when paginating back From f24c1ffe8b8222f092803a4ddbd5ca45f9e71bad Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Tue, 15 Mar 2022 16:16:19 +0300 Subject: [PATCH 2/3] Add changelog --- changelog.d/5441.change | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5441.change diff --git a/changelog.d/5441.change b/changelog.d/5441.change new file mode 100644 index 000000000..ba20e8807 --- /dev/null +++ b/changelog.d/5441.change @@ -0,0 +1 @@ +RoomDataSource: Reload thread screen for the first message. From d4547267230e3e54f18e3961f66fdc6e263bb3aa Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Wed, 16 Mar 2022 13:34:55 +0300 Subject: [PATCH 3/3] Avoid thread view controller pushing twice --- Riot/Modules/Threads/ThreadsCoordinator.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Riot/Modules/Threads/ThreadsCoordinator.swift b/Riot/Modules/Threads/ThreadsCoordinator.swift index 2f49786c5..e28d815fd 100644 --- a/Riot/Modules/Threads/ThreadsCoordinator.swift +++ b/Riot/Modules/Threads/ThreadsCoordinator.swift @@ -68,6 +68,10 @@ final class ThreadsCoordinator: NSObject, ThreadsCoordinatorProtocol { // Detect when view controller has been dismissed by gesture when presented modally (not in full screen). self.navigationRouter.toPresentable().presentationController?.delegate = self + guard parameters.threadId == nil else { + return + } + if self.navigationRouter.modules.isEmpty == false { self.navigationRouter.push(rootCoordinator, animated: true, popCompletion: { [weak self] in self?.remove(childCoordinator: rootCoordinator)