This commit is contained in:
Ian Gulliver
2026-10-20 22:28:36 -07:00
parent 5a9a8823fe
commit 6ce3ef99fa
14 changed files with 22 additions and 22 deletions
+4 -4
View File
@@ -1657,7 +1657,7 @@ struct NoteView: View {
let cancelVisible: Bool
@Environment(Store.self) private var store
@Environment(Overlays.self) private var overlays
@ViewState private var cancelling = false
@ViewState private var canceling = false
var body: some View {
let color = switch note.style {
@@ -1679,18 +1679,18 @@ struct NoteView: View {
}
if let taskId = note.cancelMergeAfterReview, cancelVisible, store.findTask(taskId)?.mergeAfterReview == true {
Button("Cancel") {
cancelling = true
canceling = true
Task {
do {
_ = try await store.api.client.cancelMergeAfterReview(path: .init(taskId: taskId)).ok
} catch {
overlays.showAlert(errorText(error))
}
cancelling = false
canceling = false
}
}
.buttonStyle(SmallLinkButtonStyle())
.disabled(cancelling)
.disabled(canceling)
.help("Withdraw this request; nothing is merged")
}
}