-
public final class UseCaseHelper
-
-
Field Summary
-
Method Summary
Modifier and Type Method Description final ReplayEventsForActiveChannelsgetReplayEventsForActiveChannels()Adds the provided channel to the active channels and replays events for all active channels final GetChannelControllergetGetChannelController()Get channel controller for cid Returns a channel controller object final WatchChannelgetWatchChannel()Watch a channel/ Start listening for events on a channel Returns a channel controller object final QueryChannelsgetQueryChannels()Query channels and start listening for changes using events Returns a QueryChannelsController object final GetThreadgetGetThread()Returns a ThreadController for the specified thread final GetTotalUnreadCountgetGetTotalUnreadCount()Returns a livedata object for the total number of unread messages final GetUnreadChannelCountgetGetUnreadChannelCount()Returns a livedata object for the number of channels with unread messages final LoadOlderMessagesgetLoadOlderMessages()Loads older messages for the given channel final LoadNewerMessagesgetLoadNewerMessages()Loads newer messages for the given channel final QueryChannelsLoadMoregetQueryChannelsLoadMore()Load more channels for the given query. final ThreadLoadMoregetThreadLoadMore()Loads more messages for a thread final CreateChannelgetCreateChannel()Create a channel and retry using the retry policy if the request fails final SendMessagegetSendMessage()Send a message. final CancelMessagegetCancelMessage()Cancel an emphemeral message. final ShuffleGiphygetShuffleGiphy()Performs giphy shuffle operation. final SendGiphygetSendGiphy()Sends selected giphy message to the channel. final SendMessageWithAttachmentsgetSendMessageWithAttachments()Send a message with attachments. final EditMessagegetEditMessage()Edit a message. final DeleteMessagegetDeleteMessage()Delete a message. final SendReactiongetSendReaction()Send a reaction. final DeleteReactiongetDeleteReaction()Delete a reaction. final KeystrokegetKeystroke()Keystroke should be called whenever the user enters something in the message input public * It handles the deduplication and removal of typing events automatically final StopTypinggetStopTyping()stopTyping is typically called manually when the message is submitted final MarkReadgetMarkRead()markRead marks all messages on a channel read final MarkAllReadgetMarkAllRead()markAllRead marks all messages on a channel as read final HideChannelgetHideChannel()hideChannel hides the channel till a new message event is received final ShowChannelgetShowChannel()showChannels shows a channel which was previously hidden -
-
Method Detail
-
getReplayEventsForActiveChannels
final ReplayEventsForActiveChannels getReplayEventsForActiveChannels()
Adds the provided channel to the active channels and replays events for all active channels
-
getGetChannelController
final GetChannelController getGetChannelController()
Get channel controller for cid Returns a channel controller object
-
getWatchChannel
final WatchChannel getWatchChannel()
Watch a channel/ Start listening for events on a channel Returns a channel controller object
-
getQueryChannels
final QueryChannels getQueryChannels()
Query channels and start listening for changes using events Returns a QueryChannelsController object
-
getGetThread
final GetThread getGetThread()
Returns a ThreadController for the specified thread
-
getGetTotalUnreadCount
final GetTotalUnreadCount getGetTotalUnreadCount()
Returns a livedata object for the total number of unread messages
-
getGetUnreadChannelCount
final GetUnreadChannelCount getGetUnreadChannelCount()
Returns a livedata object for the number of channels with unread messages
-
getLoadOlderMessages
final LoadOlderMessages getLoadOlderMessages()
Loads older messages for the given channel
-
getLoadNewerMessages
final LoadNewerMessages getLoadNewerMessages()
Loads newer messages for the given channel
-
getQueryChannelsLoadMore
final QueryChannelsLoadMore getQueryChannelsLoadMore()
Load more channels for the given query.
-
getThreadLoadMore
final ThreadLoadMore getThreadLoadMore()
Loads more messages for a thread
-
getCreateChannel
final CreateChannel getCreateChannel()
Create a channel and retry using the retry policy if the request fails
-
getSendMessage
final SendMessage getSendMessage()
Send a message. This message is immediately added to local storage. The API call to create the message is retried using the retry policy
-
getCancelMessage
final CancelMessage getCancelMessage()
Cancel an emphemeral message. This message is immediately removed from local storage. The API call to delete the message is retried using the retry policy
-
getShuffleGiphy
final ShuffleGiphy getShuffleGiphy()
Performs giphy shuffle operation. Removes the original "ephemeral" message from local storage. Returns new "ephemeral" message with new giphy url. API call to remove the message is retried according to the retry policy specified on the chatDomain
-
getSendGiphy
final SendGiphy getSendGiphy()
Sends selected giphy message to the channel. Replaces the original "ephemeral" message in local storage with the one received from backend. Returns new "ephemeral" message with new giphy url. API call to remove the message is retried according to the retry policy specified on the chatDomain
-
getSendMessageWithAttachments
final SendMessageWithAttachments getSendMessageWithAttachments()
Send a message with attachments.
-
getEditMessage
final EditMessage getEditMessage()
Edit a message. This message is immediately updated in local storage. The API call to edit the message is retried using the retry policy
-
getDeleteMessage
final DeleteMessage getDeleteMessage()
Delete a message. This message is immediately marked as deleted (message.deletedAt) in local storage. The API call to delete the message is retried using the retry policy
-
getSendReaction
final SendReaction getSendReaction()
Send a reaction. This reaction is immediately added to local storage. The API call to send a reaction is retried using the retry policy
-
getDeleteReaction
final DeleteReaction getDeleteReaction()
Delete a reaction. This reaction is immediately marked as deleted in local storage. The API call to delete a reaction is retried using the retry policy
-
getKeystroke
final Keystroke getKeystroke()
Keystroke should be called whenever the user enters something in the message input public * It handles the deduplication and removal of typing events automatically
-
getStopTyping
final StopTyping getStopTyping()
stopTyping is typically called manually when the message is submitted
-
getMarkRead
final MarkRead getMarkRead()
markRead marks all messages on a channel read
-
getMarkAllRead
final MarkAllRead getMarkAllRead()
markAllRead marks all messages on a channel as read
-
getHideChannel
final HideChannel getHideChannel()
hideChannel hides the channel till a new message event is received
-
getShowChannel
final ShowChannel getShowChannel()
showChannels shows a channel which was previously hidden
-
-
-
-