mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
when focussing an event in a thread of a new room, focus the thread root in the room that has been opened
This commit is contained in:
@@ -173,6 +173,9 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
if case .thread(threadRootEventID: threadRootEventID, _) = stateMachine.state, let threadCoordinator = childThreads.last {
|
if case .thread(threadRootEventID: threadRootEventID, _) = stateMachine.state, let threadCoordinator = childThreads.last {
|
||||||
threadCoordinator.focusOnEvent(eventID: eventID)
|
threadCoordinator.focusOnEvent(eventID: eventID)
|
||||||
} else {
|
} else {
|
||||||
|
if childThreads.isEmpty {
|
||||||
|
roomScreenCoordinator?.focusOnEvent(.init(eventID: eventID, shouldSetPin: false))
|
||||||
|
}
|
||||||
stateMachine.tryEvent(.presentThread(threadRootEventID: threadRootEventID, focusEventID: eventID))
|
stateMachine.tryEvent(.presentThread(threadRootEventID: threadRootEventID, focusEventID: eventID))
|
||||||
}
|
}
|
||||||
} else if !childThreads.isEmpty {
|
} else if !childThreads.isEmpty {
|
||||||
@@ -260,7 +263,7 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
guard flowParameters.appSettings.threadsEnabled, let threadRootEventID = event.threadRootEventId() else {
|
guard flowParameters.appSettings.threadsEnabled, let threadRootEventID = event.threadRootEventId() else {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
stateMachine.tryEvent(.presentRoom(presentationAction: nil), userInfo: EventUserInfo(animated: animated))
|
stateMachine.tryEvent(.presentRoom(presentationAction: .eventFocus(.init(eventID: threadRootEventID, shouldSetPin: false))), userInfo: EventUserInfo(animated: animated))
|
||||||
stateMachine.tryEvent(.presentThread(threadRootEventID: threadRootEventID, focusEventID: focusEvent.eventID), userInfo: EventUserInfo(animated: false))
|
stateMachine.tryEvent(.presentThread(threadRootEventID: threadRootEventID, focusEventID: focusEvent.eventID), userInfo: EventUserInfo(animated: false))
|
||||||
return
|
return
|
||||||
case .failure:
|
case .failure:
|
||||||
|
|||||||
Reference in New Issue
Block a user