Skip to content

Commit

Permalink
wip: task error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bouassaba committed Nov 26, 2024
1 parent 488e9b3 commit 5b56b52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 3 additions & 1 deletion Sources/Screens/File/FileOverview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ struct FileOverview: View, ViewDataProvider, LoadStateProvider, TimerLifecycle,
.onChange(of: searchText) {
fileStore.searchPublisher.send($1)
}
.refreshable { fileStore.fetchNextPage(replace: true) }
.refreshable {
fileStore.fetchNextPage(replace: true)
}
}
}
}
Expand Down
7 changes: 1 addition & 6 deletions Sources/Screens/Task/TaskList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,7 @@ struct TaskList: View, ViewDataProvider, LoadStateProvider, TimerLifecycle, Toke

private func performDismissAll() {
withErrorHandling {
let result = try await taskStore.dismiss()
if let result {
if !result.succeeded.isEmpty {
fileStore.fetchTaskCount()
}
}
_ = try await taskStore.dismiss()
return true
} before: {
isDismissingAll = true
Expand Down
1 change: 0 additions & 1 deletion Sources/Screens/Task/TaskOverview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ struct TaskOverview: View, ErrorPresentable {
private func performDismiss() {
withErrorHandling {
try await taskStore.dismiss(task.id)
fileStore.fetchTaskCount()
return true
} before: {
isDismissing = true
Expand Down

0 comments on commit 5b56b52

Please sign in to comment.