We can react on e2e room text event

This commit is contained in:
Benoit Marty 2019-07-10 11:51:09 +02:00
parent fe82ad2002
commit 19c7de687e
3 changed files with 4 additions and 4 deletions

View File

@ -104,8 +104,8 @@ class MessageActionsBottomSheet : VectorBaseBottomSheetDialogFragment() {
}
quickReactionFragment.interactionListener = object : QuickReactionFragment.InteractionListener {

override fun didQuickReactWith(clikedOn: String, add: Boolean, eventId: String) {
actionHandlerModel.fireAction(MessageMenuViewModel.ACTION_QUICK_REACT, Triple(eventId, clikedOn, add))
override fun didQuickReactWith(clickedOn: String, add: Boolean, eventId: String) {
actionHandlerModel.fireAction(MessageMenuViewModel.ACTION_QUICK_REACT, Triple(eventId, clickedOn, add))
dismiss()
}
}

View File

@ -52,7 +52,7 @@ data class MessageActionState(
fun time(): String? = timelineEvent()?.root?.originServerTs?.let { dateFormat.format(Date(it)) }
?: ""

fun canReact(): Boolean = timelineEvent()?.root?.type == EventType.MESSAGE && timelineEvent()?.sendState?.isSent() == true
fun canReact(): Boolean = timelineEvent()?.root?.getClearType() == EventType.MESSAGE && timelineEvent()?.sendState?.isSent() == true

fun messageBody(eventHtmlRenderer: EventHtmlRenderer?, noticeEventFormatter: NoticeEventFormatter?): CharSequence? {
return when (timelineEvent()?.root?.getClearType()) {

View File

@ -76,7 +76,7 @@ class QuickReactionFragment : VectorBaseFragment() {
}

interface InteractionListener {
fun didQuickReactWith(clikedOn: String, add: Boolean, eventId: String)
fun didQuickReactWith(clickedOn: String, add: Boolean, eventId: String)
}

companion object {