Extract MessageComposerContext class from MessageComposerPresenter (#876)

When sending "Composer" analytics from screens other than the composer's (e.g. send location from map) we need to know the composer's mode in order to properly fill the analytics event. `MessageComposerContext` hoists this state so that other presenters can also read it.

Related to:
https://github.com/vector-im/element-meta/issues/1674
https://github.com/vector-im/element-meta/issues/1682
This commit is contained in:
Marco Romano 2023-07-14 13:32:09 +02:00 committed by GitHub
parent 753d44471c
commit a63d3df39c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 165 additions and 36 deletions

View file

@ -51,4 +51,13 @@ sealed interface MessageComposerMode : Parcelable {
is Quote -> eventId
is Reply -> eventId
}
val isEditing: Boolean
get() = this is Edit
val isReply: Boolean
get() = this is Reply
val inThread: Boolean
get() = false // TODO
}