accept non unicode reactions

This commit is contained in:
Valere 2019-07-09 10:13:56 +02:00
parent 49d73f360e
commit 2be6058971
4 changed files with 6 additions and 6 deletions

View File

@ -35,7 +35,6 @@ import im.vector.riotx.R
import im.vector.riotx.core.extensions.canReact
import im.vector.riotx.core.platform.VectorViewModel
import im.vector.riotx.core.resources.StringProvider
import im.vector.riotx.core.utils.isSingleEmoji
import im.vector.riotx.features.home.room.detail.timeline.item.MessageInformationData


@ -244,7 +243,7 @@ class MessageMenuViewModel @AssistedInject constructor(@Assisted initialState: M
//Only event of type Event.EVENT_TYPE_MESSAGE are supported for the moment
if (event.root.getClearType() != EventType.MESSAGE) return false
//TODO if user is admin or moderator
return event.annotations?.reactionsSummary?.any { isSingleEmoji(it.key) } ?: false
return event.annotations?.reactionsSummary?.isNotEmpty() ?: false
}



View File

@ -90,7 +90,7 @@ class ViewReactionViewModel @AssistedInject constructor(@Assisted
.flatMapSingle { summaries ->
Observable
.fromIterable(summaries.reactionsSummary)
.filter { reactionAggregatedSummary -> isSingleEmoji(reactionAggregatedSummary.key) }
//.filter { reactionAggregatedSummary -> isSingleEmoji(reactionAggregatedSummary.key) }
.toReactionInfoList()
}
.execute {

View File

@ -71,7 +71,7 @@ class MessageInformationDataFactory @Inject constructor(private val session: Ses
memberName = formattedMemberName,
showInformation = showInformation,
orderedReactionList = event.annotations?.reactionsSummary
?.filter { isSingleEmoji(it.key) }
//?.filter { isSingleEmoji(it.key) }
?.map {
ReactionInfoData(it.key, it.count, it.addedByMe, it.localEchoEvents.isEmpty())
},

View File

@ -37,8 +37,9 @@

<TextView
android:id="@+id/reactionText"
android:layout_width="20dp"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:minWidth="20dp"
android:layout_gravity="center"
android:layout_marginStart="6dp"
android:layout_marginLeft="6dp"
@ -50,7 +51,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@id/reactionCount"
tools:text="👍" />
tools:text="* Party Parrot Again *" />

<TextView
android:id="@+id/reactionCount"