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.
This commit is contained in:
@@ -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.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user