Class ReplaceEvent
-
- All Implemented Interfaces:
public class ReplaceEventFired when a message in the UI should be replaced in place by a newly-created copy.
Used by the resend flow: after network recovery the SDK re-sends a queued message as a brand new message with a new
clientId. Without this event the new copy is appended to the end of the list while the original is removed, so the resent message jumps to the bottom and can sink under an open keyboard. Listeners should instead move the new copy into the original's slot, keeping the list order and scroll position stable.
-
-
Constructor Summary
Constructors Constructor Description ReplaceEvent(int originalClientId, Message newMessage)
-
Method Summary
Modifier and Type Method Description intgetOriginalClientId()clientId of the original message that is being replaced. MessagegetNewMessage()The newly-created message that should take the original's list position. -
-
Method Detail
-
getOriginalClientId
int getOriginalClientId()
clientId of the original message that is being replaced.
-
getNewMessage
Message getNewMessage()
The newly-created message that should take the original's list position.
-
-
-
-