mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Limit conversations a message can be forwarded to (#5793)
* Limit conversations a message can be forwarded to * Review fixups * fix: remove the unused constant argument --------- Co-authored-by: Mauro Romito <mauro.romito@element.io>
This commit is contained in:
@@ -19,6 +19,7 @@ struct MessageForwardingScreen: View {
|
||||
ForEach(context.viewState.rooms) { room in
|
||||
MessageForwardingListRow(room: room,
|
||||
isSelected: context.viewState.selectedRoomIDs.contains(room.id),
|
||||
isDisabled: context.viewState.isAtRoomSelectionLimit && !context.viewState.selectedRoomIDs.contains(room.id),
|
||||
context: context)
|
||||
}
|
||||
// Replace these with ScrollView's `scrollPosition` when dropping iOS 16.
|
||||
@@ -68,6 +69,7 @@ private struct MessageForwardingListRow: View {
|
||||
|
||||
let room: MessageForwardingRoom
|
||||
let isSelected: Bool
|
||||
let isDisabled: Bool
|
||||
let context: MessageForwardingScreenViewModel.Context
|
||||
|
||||
var body: some View {
|
||||
@@ -77,6 +79,7 @@ private struct MessageForwardingListRow: View {
|
||||
kind: .selection(isSelected: isSelected) {
|
||||
context.send(viewAction: .selectRoom(roomID: room.id))
|
||||
})
|
||||
.disabled(isDisabled)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
||||
Reference in New Issue
Block a user