fix: sheet bindings and bash typo in TrackerView
This commit is contained in:
@@ -115,7 +115,7 @@ struct HabitListView: View {
|
|||||||
.presentationDragIndicator(.visible)
|
.presentationDragIndicator(.visible)
|
||||||
.presentationBackground(Color(hex: "0a0a1a"))
|
.presentationBackground(Color(hex: "0a0a1a"))
|
||||||
}
|
}
|
||||||
.sheet(item: ) { habit in
|
.sheet(item: $editingHabit) { habit in
|
||||||
EditHabitView(isPresented: .constant(true), habit: habit) { await loadHabits(refresh: true) }
|
EditHabitView(isPresented: .constant(true), habit: habit) { await loadHabits(refresh: true) }
|
||||||
.presentationDetents([.large])
|
.presentationDetents([.large])
|
||||||
.presentationDragIndicator(.visible)
|
.presentationDragIndicator(.visible)
|
||||||
@@ -146,7 +146,7 @@ struct HabitListView: View {
|
|||||||
await loadHabits(refresh: true)
|
await loadHabits(refresh: true)
|
||||||
} catch APIError.serverError(let code, _) where code == 409 {
|
} catch APIError.serverError(let code, _) where code == 409 {
|
||||||
await MainActor.run {
|
await MainActor.run {
|
||||||
if let idx = habits.firstIndex(where: { /bin/bash.id == habit.id }) {
|
if let idx = habits.firstIndex(where: { $0.id == habit.id }) {
|
||||||
habits[idx].completedToday = true
|
habits[idx].completedToday = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -298,7 +298,7 @@ struct TaskListView: View {
|
|||||||
.presentationDragIndicator(.visible)
|
.presentationDragIndicator(.visible)
|
||||||
.presentationBackground(Color(hex: "0a0a1a"))
|
.presentationBackground(Color(hex: "0a0a1a"))
|
||||||
}
|
}
|
||||||
.sheet(item: ) { task in
|
.sheet(item: $editingTask) { task in
|
||||||
EditTaskView(isPresented: .constant(true), task: task) { await loadTasks(refresh: true) }
|
EditTaskView(isPresented: .constant(true), task: task) { await loadTasks(refresh: true) }
|
||||||
.presentationDetents([.medium, .large])
|
.presentationDetents([.medium, .large])
|
||||||
.presentationDragIndicator(.visible)
|
.presentationDragIndicator(.visible)
|
||||||
|
|||||||
Reference in New Issue
Block a user