Fix chat task accept - don't set taskAccepted flag to avoid unwanted navigation

This commit is contained in:
John Pinkyfloyd 2026-02-17 11:26:52 -08:00
parent c020fca1d6
commit 4712f40c8b

View file

@ -682,13 +682,14 @@ struct TaskDetailScreen: View {
Task {
do {
try await APIService.shared.acceptTask(taskId: task.taskId)
taskAccepted = true
if task.isChat {
// Go directly to chat for chat tasks
// Don't set taskAccepted to avoid triggering unwanted state changes
showingChat = true
} else {
// Stay on detail screen, start beacon scanning if applicable
// Stay on detail screen
taskAccepted = true
if let d = details, d.servicePointId > 0 {
startBeaconScanning(d.servicePointId)
}