From 44cbd3b1e4f92731b464717efb49808bb533916c Mon Sep 17 00:00:00 2001 From: FuelBoard Contributor Date: Wed, 16 Sep 2026 16:30:27 +0100 Subject: [PATCH] feat: route all Live Activity island taps through Tap station action Expanded leading/trailing, compact and minimal island views had no Link, so tapping them just opened the app with no destination. Every island region now links to the same tap destination as the Lock Screen card (Maps vs in-app detail). Tap hint captions follow the setting too: Tap for details vs Tap for directions. --- .../FuelBoardLiveActivityView.swift | 27 +++++++++++++------ Shared/FuelPriceWidgetViews.swift | 3 ++- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/FuelBoardWidgets/FuelBoardLiveActivityView.swift b/FuelBoardWidgets/FuelBoardLiveActivityView.swift index feb6da0..6474755 100644 --- a/FuelBoardWidgets/FuelBoardLiveActivityView.swift +++ b/FuelBoardWidgets/FuelBoardLiveActivityView.swift @@ -32,22 +32,32 @@ struct FuelBoardLiveActivity: Widget { } dynamicIsland: { context in DynamicIsland { DynamicIslandExpandedRegion(.leading) { - FuelBoardLiveActivityCompactView(context: context) + Link(destination: FuelBoardLiveActivityTap.tapDestination(for: context.state)) { + FuelBoardLiveActivityCompactView(context: context) + } } DynamicIslandExpandedRegion(.trailing) { - FuelBoardLiveActivityPriceView(context: context) + Link(destination: FuelBoardLiveActivityTap.tapDestination(for: context.state)) { + FuelBoardLiveActivityPriceView(context: context) + } } DynamicIslandExpandedRegion(.bottom) { FuelBoardLiveActivityStationView(context: context) } } compactLeading: { - Image(systemName: "fuelpump.fill") - .foregroundStyle(context.state.fuel.tintColor) + Link(destination: FuelBoardLiveActivityTap.tapDestination(for: context.state)) { + Image(systemName: "fuelpump.fill") + .foregroundStyle(context.state.fuel.tintColor) + } } compactTrailing: { - FuelBoardLiveActivityPriceView(context: context) + Link(destination: FuelBoardLiveActivityTap.tapDestination(for: context.state)) { + FuelBoardLiveActivityPriceView(context: context) + } } minimal: { - Text(context.state.priceText) - .font(.caption2.bold().monospacedDigit()) + Link(destination: FuelBoardLiveActivityTap.tapDestination(for: context.state)) { + Text(context.state.priceText) + .font(.caption2.bold().monospacedDigit()) + } } } .supplementalActivityFamilies([.small]) @@ -139,7 +149,8 @@ private struct FuelBoardLiveActivityView: View { FuelStore.priceTextAttributed(context.state.pricePence, style: context.state.priceDisplayStyle, size: 22, weight: .bold) - Text("Tap for directions") + Text(FuelStore.loadStationTapAction() == .showDetails + ? "Tap for details" : "Tap for directions") .font(.caption2) .foregroundStyle(.secondary) } diff --git a/Shared/FuelPriceWidgetViews.swift b/Shared/FuelPriceWidgetViews.swift index 876b44e..5b82c7c 100644 --- a/Shared/FuelPriceWidgetViews.swift +++ b/Shared/FuelPriceWidgetViews.swift @@ -93,7 +93,8 @@ struct FuelPriceWidgetContent: View { .font(.caption2) .foregroundStyle(.secondary) } else { - Text("Tap for directions") + Text(FuelStore.loadStationTapAction() == .showDetails + ? "Tap for details" : "Tap for directions") .font(.caption2) .foregroundStyle(.secondary) }