Skip to content

Commit

Permalink
Moved all taskActions to ContentViews to ensure they are always run a…
Browse files Browse the repository at this point in the history
…t app launch.
  • Loading branch information
Reed Es committed Mar 7, 2023
1 parent 5d1fc15 commit ea93e8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ struct ContentView: View {
}
.tag(Tabs.settings.rawValue)
}
.task(priority: .utility, taskAction)
.onContinueUserActivity(logCategoryActivityType) {
selectedTab = Tabs.categories.rawValue
handleLogCategoryUA(viewContext, $0)
Expand Down Expand Up @@ -98,6 +99,11 @@ struct ContentView: View {
Text("Serving Run not available.")
}
}

@Sendable
private func taskAction() async {
await handleTaskAction(manager)
}
}

struct ContentView_Previews: PreviewProvider {
Expand Down

0 comments on commit ea93e8b

Please sign in to comment.