Reset selection on notifications requests batch

This commit is contained in:
Thomas Ricouard 2024-10-24 13:54:38 +01:00
parent 1566dd8cd1
commit 8ce2476945

View file

@ -92,7 +92,11 @@ public struct NotificationsRequestsListView: View {
} }
.buttonStyle(.bordered) .buttonStyle(.bordered)
Button { Button {
Task { await acceptSelectedRequests(client) } Task {
await acceptSelectedRequests(client)
isInSelectMode = false
selectedRequests.removeAll()
}
} label: { } label: {
Text("Accept") Text("Accept")
} }
@ -100,7 +104,11 @@ public struct NotificationsRequestsListView: View {
.buttonStyle(.borderedProminent) .buttonStyle(.borderedProminent)
Button { Button {
Task { await rejectSelectedRequests(client) } Task {
await rejectSelectedRequests(client)
isInSelectMode = false
selectedRequests.removeAll()
}
} label: { } label: {
Text("Reject") Text("Reject")
} }