ActivityPresenter
public struct ActivityPresenter<T> where T : ActivityProtocol
Activity Presenter for the managing events for the activity.
-
An activity. See
ActivityProtocol
.Declaration
Swift
public let activity: T
-
A reaction presenter for the handling reactions. See
ReactionPresenter
.Declaration
Swift
public let reactionPresenter: ReactionPresenter
-
Reaction types for the handling.
Declaration
Swift
public var reactionTypes: ActivityPresenterReactionTypes
-
An original activity, if the object is type of
ActivityObject
. If the activity is a result of a repost, this property will contains the original activity.Declaration
Swift
public var originalActivity: T { get }
-
An attachment of the original activity. See
AttachmentRepresentable
.Declaration
Swift
public var originalActivityAttachment: AttachmentRepresentable? { get }
-
Creates an activity presenter for an activity with a reaction presenter.
Declaration
Swift
public init(activity: T, reactionPresenter: ReactionPresenter, reactionTypes: ActivityPresenterReactionTypes = [])
-
Creates a reaction paginator based on the activity id and a reaction kind.
Declaration
Swift
public func reactionPaginator<E: ReactionExtraDataProtocol, U: UserProtocol>(activityId: String, reactionKind: ReactionKind) -> ReactionPaginator<E, U> where T.ReactionType == GetStream.Reaction<E, U>
-
A number of cells in the activity section.
Declaration
Swift
public var cellsCount: Int { get }
-
Returns the type of the cell at a row.
Declaration
Swift
public func cellType(at row: Int) -> ActivityPresenterCellType?
-
Check if activity table view section needs to show with reactions.
Declaration
Swift
public var withReactions: Bool { get }
Available where T
: ActivityProtocol
, T.ReactionType
: ReactionProtocol
, T.ReactionType.UserType
: (UserNameRepresentable
& AvatarRepresentable
)
-
Return a title for the activity reaction of a reaction kind.
Declaration
Swift
public func reactionTitle(for activity: T, kindOf reactionKind: ReactionKind, suffix: String) -> String?
-
Returns a list of avatar URL’s for the activity reactions of a reaction kind.
Declaration
Swift
public func reactionUserAvatarURLs(for activity: T, kindOf reactionKind: ReactionKind) -> [URL]
-
Returns a comment for the activity at an index.
Declaration
Swift
public func comment(for activity: T, at index: Int) -> T.ReactionType?