mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Knock Requests List Screen (#3533)
* created the basic navigation and files * updated the logic so that the buttons that do not have permissions won't show * added the empty state * progress in making the list UI * update tests * UI improvements * fixed an issue with media provider * update button style * fixed a navigation bug * pr suggestions * pr suggestions
This commit is contained in:
@@ -75,6 +75,10 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
bindings: .init()),
|
||||
mediaProvider: mediaProvider)
|
||||
|
||||
appSettings.$knockingEnabled
|
||||
.weakAssign(to: \.state.knockingEnabled, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appMediator.networkMonitor.reachabilityPublisher
|
||||
.filter { $0 == .reachable }
|
||||
.receive(on: DispatchQueue.main)
|
||||
@@ -160,6 +164,8 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
case .processTapPinnedEvents:
|
||||
analyticsService.trackInteraction(name: .PinnedMessageRoomInfoButton)
|
||||
actionsSubject.send(.displayPinnedEventsTimeline)
|
||||
case .processTapRequestsToJoin:
|
||||
actionsSubject.send(.displayKnockingRequests)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,6 +218,8 @@ class RoomDetailsScreenViewModel: RoomDetailsScreenViewModelType, RoomDetailsScr
|
||||
state.canEditRoomAvatar = await (try? roomProxy.canUser(userID: roomProxy.ownUserID, sendStateEvent: .roomAvatar).get()) == true
|
||||
state.canEditRolesOrPermissions = await (try? roomProxy.suggestedRole(for: roomProxy.ownUserID).get()) == .administrator
|
||||
state.canInviteUsers = await (try? roomProxy.canUserInvite(userID: roomProxy.ownUserID).get()) == true
|
||||
state.canKickUsers = await (try? roomProxy.canUserKick(userID: roomProxy.ownUserID).get()) == true
|
||||
state.canBanUsers = await (try? roomProxy.canUserBan(userID: roomProxy.ownUserID).get()) == true
|
||||
}
|
||||
|
||||
private func setupNotificationSettingsSubscription() {
|
||||
|
||||
Reference in New Issue
Block a user