mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 04:18:31 +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:
@@ -160,6 +160,15 @@ struct RoomDetailsScreen: View {
|
||||
})
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomDetailsScreen.people)
|
||||
}
|
||||
if context.viewState.canSeeKnockingRequests {
|
||||
ListRow(label: .default(title: L10n.screenRoomDetailsRequestsToJoinTitle,
|
||||
icon: \.askToJoin),
|
||||
// TODO: Display count if requests > 0 when an API for them is available
|
||||
details: .counter(1),
|
||||
kind: .navigationLink {
|
||||
context.send(viewAction: .processTapRequestsToJoin)
|
||||
})
|
||||
}
|
||||
ListRow(label: .default(title: L10n.screenPollsHistoryTitle,
|
||||
icon: \.polls),
|
||||
kind: .navigationLink {
|
||||
@@ -294,6 +303,7 @@ struct RoomDetailsScreen: View {
|
||||
|
||||
struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static let genericRoomViewModel = {
|
||||
ServiceLocator.shared.settings.knockingEnabled = true
|
||||
let members: [RoomMemberProxyMock] = [
|
||||
.mockMeAdmin,
|
||||
.mockAlice,
|
||||
@@ -357,6 +367,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
}()
|
||||
|
||||
static let simpleRoomViewModel = {
|
||||
ServiceLocator.shared.settings.knockingEnabled = true
|
||||
let members: [RoomMemberProxyMock] = [
|
||||
.mockMeAdmin,
|
||||
.mockAlice,
|
||||
|
||||
Reference in New Issue
Block a user