Interface SendReactionListener
-
- All Implemented Interfaces:
public interface SendReactionListenerListener for io.getstream.chat.android.client.ChatClient.sendReaction calls.
-
-
Method Summary
Modifier and Type Method Description abstract UnitonSendReactionRequest(String cid, Reaction reaction, Boolean enforceUnique, User currentUser)A method called before making an API call to send the reaction. abstract UnitonSendReactionResult(String cid, Reaction reaction, Boolean enforceUnique, User currentUser, Result<Reaction> result)A method called after receiving the response from the send reaction call. abstract Result<Unit>onSendReactionPrecondition(User currentUser, Reaction reaction)Runs precondition check for ChatClient.sendReaction. Result<Unit>onSendReactionPrecondition(String cid, User currentUser, Reaction reaction)Runs precondition check for ChatClient.sendReaction. -
-
Method Detail
-
onSendReactionRequest
abstract Unit onSendReactionRequest(String cid, Reaction reaction, Boolean enforceUnique, User currentUser)
A method called before making an API call to send the reaction.
- Parameters:
cid- The full channel id, i.e.reaction- The Reaction to send.enforceUnique- Flag to determine whether the reaction should replace other ones added by the current user.currentUser- The currently logged in user.
-
onSendReactionResult
abstract Unit onSendReactionResult(String cid, Reaction reaction, Boolean enforceUnique, User currentUser, Result<Reaction> result)
A method called after receiving the response from the send reaction call.
- Parameters:
cid- The full channel id, i.e.reaction- The Reaction to send.enforceUnique- Flag to determine whether the reaction should replace other ones added by the current user.currentUser- The currently logged in user.result- The API call result.
-
onSendReactionPrecondition
@Deprecated(message = "This method will be removed in the future. Use SendReactionListener#onSendReactionPrecondition(cid, currentUser, reaction) instead.For backwards compatibility, this method is still called internally by the new, non-deprecated method.") abstract Result<Unit> onSendReactionPrecondition(User currentUser, Reaction reaction)
Runs precondition check for ChatClient.sendReaction. The request will be run if the method returns Result.Success and won't be made if it returns Result.Failure.
- Parameters:
currentUser- The currently logged in user.reaction- The Reaction to send.- Returns:
Result.Success if the precondition is fulfilled, Result.Failure otherwise.
-
onSendReactionPrecondition
Result<Unit> onSendReactionPrecondition(String cid, User currentUser, Reaction reaction)
Runs precondition check for ChatClient.sendReaction. The request will be run if the method returns Result.Success and won't be made if it returns Result.Failure.
- Parameters:
cid- The full channel id, i.e.currentUser- The currently logged in user.reaction- The Reaction to send.
-
-
-
-