feat: savings tab, fix pull-to-refresh, beautiful modals, fix signing
This commit is contained in:
@@ -76,13 +76,16 @@ struct TasksView: View {
|
||||
}
|
||||
.sheet(isPresented: $showAddTask) {
|
||||
AddTaskView(isPresented: $showAddTask) { await loadTasks() }
|
||||
.presentationDetents([.medium, .large])
|
||||
.presentationDragIndicator(.visible)
|
||||
.presentationBackground(Color(hex: "0a0a1a"))
|
||||
}
|
||||
.task { await loadTasks() }
|
||||
.refreshable { await loadTasks() }
|
||||
.refreshable { await loadTasks(refresh: true) }
|
||||
}
|
||||
|
||||
func loadTasks() async {
|
||||
isLoading = true
|
||||
func loadTasks(refresh: Bool = false) async {
|
||||
if !refresh { isLoading = true }
|
||||
tasks = (try? await APIService.shared.getTasks(token: authManager.token)) ?? []
|
||||
isLoading = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user