Package 

Object NoOpComposerStateSaver

  • All Implemented Interfaces:
    io.getstream.chat.android.ui.common.feature.messages.composer.internal.ComposerStateSaver

    
    public class NoOpComposerStateSaver
     implements ComposerStateSaver
                        

    A ComposerStateSaver that does nothing.

    Used as a fallback when the ViewModel is created without CreationExtras (e.g. via the legacy ViewModelProvider.Factory.create overload). Composer state will not survive process death in this case.

    • Method Summary

      Modifier and Type Method Description
      Unit saveAttachments(List<Attachment> attachments) Save the attachments from the composer.
      List<Attachment> restoreAttachments() Restores the attachments to the composer.
      Unit clear() Clears the stored state.
      • Methods inherited from class java.lang.Object

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

      • saveAttachments

         Unit saveAttachments(List<Attachment> attachments)

        Save the attachments from the composer.

        Implementations should be cheap to call frequently — this is invoked on every change to the attachment list.

      • clear

         Unit clear()

        Clears the stored state.