quick and dirty /join command (#3288)

Co-authored-by: Mauro Romito <mauro.romito@element.io>
Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
This commit is contained in:
Matthew Hodgson
2024-09-19 16:29:42 +02:00
committed by GitHub
parent 943f33b496
commit 78fb64ced2
3 changed files with 45 additions and 4 deletions
@@ -11,11 +11,16 @@ import WysiwygComposer
/// A table view wrapper that displays the timeline of a room.
struct TimelineView: UIViewControllerRepresentable {
@EnvironmentObject private var viewModelContext: TimelineViewModel.Context
@Environment(\.openURL) var openURL
func makeUIViewController(context: Context) -> TimelineTableViewController {
let tableViewController = TimelineTableViewController(coordinator: context.coordinator,
isScrolledToBottom: $viewModelContext.isScrolledToBottom,
scrollToBottomPublisher: viewModelContext.viewState.timelineViewState.scrollToBottomPublisher)
// Needs to be dispatched on main asynchronously otherwise we get a runtime warning
DispatchQueue.main.async {
viewModelContext.send(viewAction: .setOpenURLAction(openURL))
}
return tableViewController
}