From 55e9ebbe03c12d5b12e752bad10651cb6f3a0b3f Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Tue, 7 Jul 2026 00:04:19 +0200 Subject: [PATCH] Changed the ActionButtonStyle from a PrimitiveButtonStyle to a ButtonStyle in the Attendi widget target so that SwiftUI and WidgetKit keep firing the button intents from the Live Activity. --- .../Sources/Styles/Buttons/ActionButtonStyle.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Widgets/Attendi/Sources/Styles/Buttons/ActionButtonStyle.swift b/Widgets/Attendi/Sources/Styles/Buttons/ActionButtonStyle.swift index 4eb320e..5ea8577 100644 --- a/Widgets/Attendi/Sources/Styles/Buttons/ActionButtonStyle.swift +++ b/Widgets/Attendi/Sources/Styles/Buttons/ActionButtonStyle.swift @@ -4,7 +4,11 @@ import WidgetKit /// The style of the action buttons of the recording Live Activity: it renders a button's label as a fixed-size icon on a circle /// colored by the ``ActionType`` given at initialization. -struct ActionButtonStyle: PrimitiveButtonStyle { +/// +/// The style is a regular ``ButtonStyle`` — not a ``PrimitiveButtonStyle`` — so that SwiftUI and WidgetKit keep handling the +/// button's tap and fire its intent from the Live Activity; a primitive style would have to invoke the trigger itself, which arbitrary +/// gestures cannot do inside a widget. +struct ActionButtonStyle: ButtonStyle { // MARK: Properties @@ -100,7 +104,7 @@ private enum Constant { // MARK: - Styles -extension PrimitiveButtonStyle where Self == ActionButtonStyle { +extension ButtonStyle where Self == ActionButtonStyle { /// An action button style for a button behind the given type of action. ///