Reactionable

public protocol Reactionable

A reactionable protocol.

Available where ReactionType: ReactionProtocol

  • hasUserOwnReaction(_:) Extension method

    Check user reactions with a given reaction kind.

    Declaration

    Swift

    public func hasUserOwnReaction(_ reactionKind: ReactionKind) -> Bool

    Parameters

    reactionKind

    a kind of the reaction.

    Return Value

    true if exists the reaction of the user.

  • userOwnReactionsCount(_:) Extension method

    The number of user reactions with a given reaction kind.

    Declaration

    Swift

    public func userOwnReactionsCount(_ reactionKind: ReactionKind) -> Int

    Parameters

    reactionKind

    a kind of the reaction.

    Return Value

    the number of user reactions.

  • userOwnReaction(_:) Extension method

    Try to get the first user reaction with a given reaction kind.

    Declaration

    Swift

    public func userOwnReaction(_ reactionKind: ReactionKind) -> ReactionType?

    Parameters

    reactionKind

    a kind of the reaction.

    Return Value

    the user reaction.

  • addUserOwnReaction(_:) Extension method

    Update the activity with a new user own reaction.

    Declaration

    Swift

    public mutating func addUserOwnReaction(_ reaction: ReactionType)

    Parameters

    reaction

    a new user own reaction.

  • removeUserOwnReaction(_:) Extension method

    Remove an existing own reaction for the activity.

    Declaration

    Swift

    public mutating func removeUserOwnReaction(_ reaction: ReactionType)

    Parameters

    reaction

    an existing user own reaction.