ReactionProtocol

public protocol ReactionProtocol : Decodable, Encodable, Equatable

A reaction protocol.

User own child reactions

  • hasUserOwnChildReaction(_:) Extension method

    Check if the user has own child reactions for the reaction with a given reaction kind.

    Declaration

    Swift

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

    Parameters

    reactionKind

    a kind of the child reaction.

    Return Value

    true if exists the child reaction of the user.

  • The number of user own child reactions with a given reaction kind.

    Declaration

    Swift

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

    Parameters

    reactionKind

    a kind of the child reaction.

    Return Value

    the number of user own child reactions.

  • userOwnChildReaction(_:) Extension method

    Try to get the first user own child reaction.

    Declaration

    Swift

    public func userOwnChildReaction(_ reactionKind: ReactionKind) -> Self?

    Parameters

    reactionKind

    a kind of the child reaction.

    Return Value

    the user child reaction.

Managing reactions

  • addUserOwnChild(_:) Extension method

    Update the reaction with a new user own child reaction.

    Declaration

    Swift

    public mutating func addUserOwnChild(_ reaction: Self)

    Parameters

    reaction

    a new user own reaction.

  • removeUserOwnChild(_:) Extension method

    Delete an existing user own child reaction for the reaction.

    Declaration

    Swift

    public mutating func removeUserOwnChild(_ reaction: Self)

    Parameters

    reaction

    an existing user own reaction.