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:
Mauro
2024-11-21 20:14:05 +01:00
committed by GitHub
parent 7e1476d973
commit e315451448
85 changed files with 701 additions and 145 deletions
@@ -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,