Support to show hidden poll events as formatted.

This commit is contained in:
Onuray Sahin 2021-12-09 15:54:37 +03:00
parent b2e599ea2b
commit d5f8931e20
3 changed files with 7 additions and 3 deletions

View file

@ -75,7 +75,9 @@ class TimelineItemFactory @Inject constructor(private val messageItemFactory: Me
EventType.REACTION, EventType.REACTION,
EventType.STATE_SPACE_CHILD, EventType.STATE_SPACE_CHILD,
EventType.STATE_SPACE_PARENT, EventType.STATE_SPACE_PARENT,
EventType.STATE_ROOM_POWER_LEVELS -> noticeItemFactory.create(params) EventType.STATE_ROOM_POWER_LEVELS,
EventType.POLL_RESPONSE,
EventType.POLL_END -> noticeItemFactory.create(params)
EventType.STATE_ROOM_WIDGET_LEGACY, EventType.STATE_ROOM_WIDGET_LEGACY,
EventType.STATE_ROOM_WIDGET -> widgetItemFactory.create(params) EventType.STATE_ROOM_WIDGET -> widgetItemFactory.create(params)
EventType.STATE_ROOM_ENCRYPTION -> encryptionItemFactory.create(params) EventType.STATE_ROOM_ENCRYPTION -> encryptionItemFactory.create(params)

View file

@ -103,7 +103,9 @@ class NoticeEventFormatter @Inject constructor(
EventType.KEY_VERIFICATION_READY, EventType.KEY_VERIFICATION_READY,
EventType.STATE_SPACE_CHILD, EventType.STATE_SPACE_CHILD,
EventType.STATE_SPACE_PARENT, EventType.STATE_SPACE_PARENT,
EventType.REDACTION -> formatDebug(timelineEvent.root) EventType.REDACTION,
EventType.POLL_RESPONSE,
EventType.POLL_END -> formatDebug(timelineEvent.root)
else -> { else -> {
Timber.v("Type $type not handled by this formatter") Timber.v("Type $type not handled by this formatter")
null null

View file

@ -127,7 +127,7 @@
<ViewStub <ViewStub
android:id="@+id/messageContentPollStub" android:id="@+id/messageContentPollStub"
style="@style/TimelineContentStubBaseParams" style="@style/TimelineContentStubBaseParams"
android:layout="@layout/item_timeline_event_poll"/> android:layout="@layout/item_timeline_event_poll" />
</FrameLayout> </FrameLayout>