feat: tap widget → opens app to food search
Widget: .widgetURL(platform://add-food) on all widget sizes App: .onOpenURL handles platform://add-food → switches to Fitness tab and opens the food assistant sheet Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -120,6 +120,12 @@ struct MainTabView: View {
|
||||
.sheet(isPresented: $showAssistant) {
|
||||
AssistantSheetView(onFoodAdded: foodAdded)
|
||||
}
|
||||
.onOpenURL { url in
|
||||
if url.scheme == "platform" && url.host == "add-food" {
|
||||
selectedTab = 1 // Fitness tab
|
||||
showAssistant = true
|
||||
}
|
||||
}
|
||||
.task {
|
||||
guard showReader else { return }
|
||||
let renderer = ArticleRenderer.shared
|
||||
|
||||
Reference in New Issue
Block a user