mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Media gallery - part 1(#3588)
* Introduce a `MediaEventsTimelineFlowCoordinator` * Update SDK API and architecture * Add a feature flag, add translations * Move the media events timeline presentation under the room flow coordinator state machine * Rename `TimelineViewState.timelineViewState` of type `TimelineState` to `timelineState` * Enabled SwiftLint's `trailing_closure` rule and fix the warnings.
This commit is contained in:
@@ -79,6 +79,10 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
.weakAssign(to: \.state.knockingEnabled, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$mediaBrowserEnabled
|
||||
.weakAssign(to: \.state.mediaBrowserEnabled, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appMediator.networkMonitor.reachabilityPublisher
|
||||
.filter { $0 == .reachable }
|
||||
.receive(on: DispatchQueue.main)
|
||||
@@ -164,6 +168,8 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
case .processTapPinnedEvents:
|
||||
analyticsService.trackInteraction(name: .PinnedMessageRoomInfoButton)
|
||||
actionsSubject.send(.displayPinnedEventsTimeline)
|
||||
case .processTapMediaEvents:
|
||||
actionsSubject.send(.displayMediaEventsTimeline)
|
||||
case .processTapRequestsToJoin:
|
||||
actionsSubject.send(.displayKnockingRequests)
|
||||
}
|
||||
@@ -207,8 +213,8 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
.receive(on: DispatchQueue.main)
|
||||
.sink { [weak self, ownUserID = roomProxy.ownUserID] members in
|
||||
guard let self else { return }
|
||||
let accountOwner = members.first(where: { $0.userID == ownUserID })
|
||||
let dmRecipient = members.first(where: { $0.userID != ownUserID })
|
||||
let accountOwner = members.first { $0.userID == ownUserID }
|
||||
let dmRecipient = members.first { $0.userID != ownUserID }
|
||||
self.dmRecipient = dmRecipient
|
||||
self.state.dmRecipient = dmRecipient.map(RoomMemberDetails.init(withProxy:))
|
||||
self.state.accountOwner = accountOwner.map(RoomMemberDetails.init(withProxy:))
|
||||
|
||||
Reference in New Issue
Block a user