ReactionGroupDataMutations extension

Extension functions for ReactionGroupData to handle common operations.

on

Properties

isEmpty bool

Available on ReactionGroupData, provided by the ReactionGroupDataMutations extension

Returns true if the reaction group is empty (count is 0 or less).
no setter

Methods

decrement(DateTime date) ReactionGroupData

Available on ReactionGroupData, provided by the ReactionGroupDataMutations extension

Returns a copy of this ReactionGroupData with the count decremented by 1 (not below 0), if the given date is within the valid range (date >= firstReactionAt or date <= lastReactionAt). Otherwise, returns the original instance.
increment(DateTime date) ReactionGroupData

Available on ReactionGroupData, provided by the ReactionGroupDataMutations extension

Returns a copy of this ReactionGroupData with the count incremented by 1 and lastReactionAt updated to the given date, if the date is after firstReactionAt. Otherwise, returns the original instance.