mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Add hooks for the RoomDetails, RoomMemberDetails and UserProfile screens. (#5980)
Also adds an @AppHook macro.
This commit is contained in:
+6
-4
@@ -14,8 +14,8 @@ typealias RoomMemberDetailsScreenViewModelType = StateStoreViewModel<RoomMemberD
|
||||
class RoomMemberDetailsScreenViewModel: RoomMemberDetailsScreenViewModelType, RoomMemberDetailsScreenViewModelProtocol {
|
||||
private let roomProxy: JoinedRoomProxyProtocol
|
||||
private let userSession: UserSessionProtocol
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
private let analytics: AnalyticsServiceProtocol
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
|
||||
private var actionsSubject: PassthroughSubject<RoomMemberDetailsScreenViewModelAction, Never> = .init()
|
||||
|
||||
@@ -28,8 +28,9 @@ class RoomMemberDetailsScreenViewModel: RoomMemberDetailsScreenViewModelType, Ro
|
||||
init(userID: String,
|
||||
roomProxy: JoinedRoomProxyProtocol,
|
||||
userSession: UserSessionProtocol,
|
||||
userIndicatorController: UserIndicatorControllerProtocol,
|
||||
analytics: AnalyticsServiceProtocol) {
|
||||
appHooks: AppHooks,
|
||||
analytics: AnalyticsServiceProtocol,
|
||||
userIndicatorController: UserIndicatorControllerProtocol) {
|
||||
self.roomProxy = roomProxy
|
||||
self.userSession = userSession
|
||||
self.userIndicatorController = userIndicatorController
|
||||
@@ -37,7 +38,8 @@ class RoomMemberDetailsScreenViewModel: RoomMemberDetailsScreenViewModelType, Ro
|
||||
|
||||
let initialViewState = RoomMemberDetailsScreenViewState(userID: userID, bindings: .init())
|
||||
|
||||
super.init(initialViewState: initialViewState, mediaProvider: userSession.mediaProvider)
|
||||
super.init(initialViewState: appHooks.roomMemberDetailsScreenHook.update(initialViewState),
|
||||
mediaProvider: userSession.mediaProvider)
|
||||
|
||||
showMemberLoadingIndicator()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user