Class ReplaceEvent

  • All Implemented Interfaces:

    
    public class ReplaceEvent
    
                        

    Fired 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      ReplaceEvent(int originalClientId, Message newMessage)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getOriginalClientId() clientId of the original message that is being replaced.
      Message getNewMessage() The newly-created message that should take the original's list position.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReplaceEvent

        ReplaceEvent(int originalClientId, Message newMessage)
    • 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.