Reactionable
public protocol Reactionable
A reactionable protocol.
-
Undocumented
Declaration
Swift
associatedtype ReactionType = ReactionProtocol
-
Include reactions added by current user to all activities.
Declaration
Swift
var userOwnReactions: [ReactionKind : [ReactionType]]? { get set }
-
Include recent reactions to activities.
Declaration
Swift
var latestReactions: [ReactionKind : [ReactionType]]? { get set }
-
Include reaction counts to activities.
Declaration
Swift
var reactionCounts: [ReactionKind : Int]? { get set }
-
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.