mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Correctly building image items for the timeline. Missing URL and way to load image.
This commit is contained in:
@@ -34,7 +34,6 @@ final class RoomScreenCoordinator: Coordinator, Presentable {
|
||||
|
||||
// Must be used only internally
|
||||
var childCoordinators: [Coordinator] = []
|
||||
var completion: ((RoomScreenViewModelResult) -> Void)?
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
@@ -43,7 +42,9 @@ final class RoomScreenCoordinator: Coordinator, Presentable {
|
||||
self.parameters = parameters
|
||||
|
||||
let timelineProvider = RoomTimelineProvider(roomProxy: parameters.roomProxy)
|
||||
let timelineController = RoomTimelineController(timelineProvider: timelineProvider)
|
||||
let timelineController = RoomTimelineController(timelineProvider: timelineProvider,
|
||||
timelineItemFactory: TimelineItemFactory(),
|
||||
timelineViewFactory: TimelineViewFactory())
|
||||
|
||||
let viewModel = RoomScreenViewModel(roomProxy: parameters.roomProxy, timelineController: timelineController)
|
||||
let view = RoomScreen(context: viewModel.context)
|
||||
@@ -53,12 +54,7 @@ final class RoomScreenCoordinator: Coordinator, Presentable {
|
||||
|
||||
// MARK: - Public
|
||||
func start() {
|
||||
MXLog.debug("[RoomScreenCoordinator] did start.")
|
||||
roomScreenViewModel.completion = { [weak self] result in
|
||||
MXLog.debug("[RoomScreenCoordinator] RoomScreenViewModel did complete with result: \(result).")
|
||||
guard let self = self else { return }
|
||||
self.completion?(result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func toPresentable() -> UIViewController {
|
||||
|
||||
@@ -30,8 +30,6 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
private let roomProxy: RoomProxyProtocol
|
||||
private let timelineController: RoomTimelineControllerProtocol
|
||||
|
||||
var completion: ((RoomScreenViewModelResult) -> Void)?
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
init(roomProxy: RoomProxyProtocol, timelineController: RoomTimelineControllerProtocol) {
|
||||
|
||||
@@ -17,8 +17,5 @@
|
||||
import Foundation
|
||||
|
||||
protocol RoomScreenViewModelProtocol {
|
||||
|
||||
var completion: ((RoomScreenViewModelResult) -> Void)? { get set }
|
||||
@available(iOS 14, *)
|
||||
var context: RoomScreenViewModelType.Context { get }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user