-
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description public final static NoOpComposerStateSaverINSTANCE
-
Method Summary
Modifier and Type Method Description UnitsaveAttachments(List<Attachment> attachments)Save the attachments from the composer. List<Attachment>restoreAttachments()Restores the attachments to the composer. Unitclear()Clears the stored state. -
-
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.
-
restoreAttachments
List<Attachment> restoreAttachments()
Restores the attachments to the composer.
-
-
-
-