mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user