mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Change order of parameters
This commit is contained in:
parent
8078c39d6e
commit
17636019e0
4 changed files with 13 additions and 13 deletions
|
@ -50,19 +50,19 @@ interface RelationService {
|
|||
|
||||
/**
|
||||
* Sends a reaction (emoji) to the targetedEvent.
|
||||
* @param reaction the reaction (preferably emoji)
|
||||
* @param targetEventId the id of the event being reacted
|
||||
* @param reaction the reaction (preferably emoji)
|
||||
*/
|
||||
fun sendReaction(reaction: String,
|
||||
targetEventId: String): Cancelable
|
||||
fun sendReaction(targetEventId: String,
|
||||
reaction: String): Cancelable
|
||||
|
||||
/**
|
||||
* Undo a reaction (emoji) to the targetedEvent.
|
||||
* @param reaction the reaction (preferably emoji)
|
||||
* @param targetEventId the id of the event being reacted
|
||||
* @param reaction the reaction (preferably emoji)
|
||||
*/
|
||||
fun undoReaction(reaction: String,
|
||||
targetEventId: String) : Cancelable
|
||||
fun undoReaction(targetEventId: String,
|
||||
reaction: String): Cancelable
|
||||
|
||||
/**
|
||||
* Edit a text message body. Limited to "m.text" contentType
|
||||
|
|
|
@ -65,7 +65,7 @@ internal class DefaultRelationService @AssistedInject constructor(@Assisted priv
|
|||
fun create(roomId: String): RelationService
|
||||
}
|
||||
|
||||
override fun sendReaction(reaction: String, targetEventId: String): Cancelable {
|
||||
override fun sendReaction(targetEventId: String, reaction: String): Cancelable {
|
||||
val event = eventFactory.createReactionEvent(roomId, targetEventId, reaction)
|
||||
.also {
|
||||
saveLocalEcho(it)
|
||||
|
@ -75,7 +75,7 @@ internal class DefaultRelationService @AssistedInject constructor(@Assisted priv
|
|||
return CancelableWork(context, sendRelationWork.id)
|
||||
}
|
||||
|
||||
override fun undoReaction(reaction: String, targetEventId: String): Cancelable {
|
||||
override fun undoReaction(targetEventId: String, reaction: String): Cancelable {
|
||||
val params = FindReactionEventForUndoTask.Params(
|
||||
roomId,
|
||||
targetEventId,
|
||||
|
|
|
@ -330,7 +330,7 @@ class PushrulesConditionTest {
|
|||
TODO("not implemented") // To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun sendReaction(reaction: String, targetEventId: String): Cancelable {
|
||||
override fun sendReaction(targetEventId: String, reaction: String): Cancelable {
|
||||
TODO("not implemented") // To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
|
|
|
@ -445,7 +445,7 @@ class RoomDetailViewModel @AssistedInject constructor(@Assisted initialState: Ro
|
|||
}
|
||||
|
||||
private fun handleSendReaction(action: RoomDetailActions.SendReaction) {
|
||||
room.sendReaction(action.reaction, action.targetEventId)
|
||||
room.sendReaction(action.targetEventId, action.reaction)
|
||||
}
|
||||
|
||||
private fun handleRedactEvent(action: RoomDetailActions.RedactAction) {
|
||||
|
@ -454,14 +454,14 @@ class RoomDetailViewModel @AssistedInject constructor(@Assisted initialState: Ro
|
|||
}
|
||||
|
||||
private fun handleUndoReact(action: RoomDetailActions.UndoReaction) {
|
||||
room.undoReaction(action.reaction, action.targetEventId)
|
||||
room.undoReaction(action.targetEventId, action.reaction)
|
||||
}
|
||||
|
||||
private fun handleUpdateQuickReaction(action: RoomDetailActions.UpdateQuickReactAction) {
|
||||
if (action.add) {
|
||||
room.sendReaction(action.selectedReaction, action.targetEventId)
|
||||
room.sendReaction(action.targetEventId, action.selectedReaction)
|
||||
} else {
|
||||
room.undoReaction(action.selectedReaction, action.targetEventId)
|
||||
room.undoReaction(action.targetEventId, action.selectedReaction)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue