mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:11:45 +00:00
Introduce a new RoomProxyType and treat rooms differently based on their membership state
This commit is contained in:
committed by
Stefan Ceriu
parent
e0ba9925e7
commit
e281a3f242
@@ -20,7 +20,7 @@ import SwiftUI
|
||||
struct ReportContentScreenCoordinatorParameters {
|
||||
let eventID: String
|
||||
let senderID: String
|
||||
let roomProxy: RoomProxyProtocol
|
||||
let roomProxy: JoinedRoomProxyProtocol
|
||||
let clientProxy: ClientProxyProtocol
|
||||
let userIndicatorController: UserIndicatorControllerProtocol
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ typealias ReportContentScreenViewModelType = StateStoreViewModel<ReportContentSc
|
||||
class ReportContentScreenViewModel: ReportContentScreenViewModelType, ReportContentScreenViewModelProtocol {
|
||||
private let eventID: String
|
||||
private let senderID: String
|
||||
private let roomProxy: RoomProxyProtocol
|
||||
private let roomProxy: JoinedRoomProxyProtocol
|
||||
private let clientProxy: ClientProxyProtocol
|
||||
private let actionsSubject: PassthroughSubject<ReportContentScreenViewModelAction, Never> = .init()
|
||||
|
||||
@@ -30,7 +30,7 @@ class ReportContentScreenViewModel: ReportContentScreenViewModelType, ReportCont
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init(eventID: String, senderID: String, roomProxy: RoomProxyProtocol, clientProxy: ClientProxyProtocol) {
|
||||
init(eventID: String, senderID: String, roomProxy: JoinedRoomProxyProtocol, clientProxy: ClientProxyProtocol) {
|
||||
self.eventID = eventID
|
||||
self.senderID = senderID
|
||||
self.roomProxy = roomProxy
|
||||
|
||||
@@ -77,7 +77,7 @@ struct ReportContentScreen: View {
|
||||
struct ReportContentScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static let viewModel = ReportContentScreenViewModel(eventID: "",
|
||||
senderID: "",
|
||||
roomProxy: RoomProxyMock(.init()),
|
||||
roomProxy: JoinedRoomProxyMock(.init()),
|
||||
clientProxy: ClientProxyMock(.init()))
|
||||
|
||||
static var previews: some View {
|
||||
|
||||
Reference in New Issue
Block a user