mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
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:
+9
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user