Fix chat task accept - don't set taskAccepted flag to avoid unwanted navigation
This commit is contained in:
parent
c020fca1d6
commit
4712f40c8b
1 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue