mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-17 12:30:07 +03:00
Merge pull request #839 from vector-im/feature/developer
Show all hidden event in the timeline when the developer settings is ON
This commit is contained in:
commit
72e6181f00
4 changed files with 3 additions and 11 deletions
|
@ -90,8 +90,7 @@ class RoomDetailViewModel @AssistedInject constructor(@Assisted initialState: Ro
|
||||||
private val timelineSettings = if (userPreferencesProvider.shouldShowHiddenEvents()) {
|
private val timelineSettings = if (userPreferencesProvider.shouldShowHiddenEvents()) {
|
||||||
TimelineSettings(30,
|
TimelineSettings(30,
|
||||||
filterEdits = false,
|
filterEdits = false,
|
||||||
filterTypes = true,
|
filterTypes = false,
|
||||||
allowedTypes = TimelineDisplayableEvents.DEBUG_DISPLAYABLE_TYPES,
|
|
||||||
buildReadReceipts = userPreferencesProvider.shouldShowReadReceipts())
|
buildReadReceipts = userPreferencesProvider.shouldShowReadReceipts())
|
||||||
} else {
|
} else {
|
||||||
TimelineSettings(30,
|
TimelineSettings(30,
|
||||||
|
|
|
@ -68,12 +68,12 @@ class TimelineItemFactory @Inject constructor(
|
||||||
encryptedItemFactory.create(event, nextEvent, highlight, callback)
|
encryptedItemFactory.create(event, nextEvent, highlight, callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unhandled event types (yet)
|
// Unhandled event types (yet)
|
||||||
EventType.STATE_ROOM_THIRD_PARTY_INVITE -> defaultItemFactory.create(event, highlight, callback)
|
EventType.STATE_ROOM_THIRD_PARTY_INVITE -> defaultItemFactory.create(event, highlight, callback)
|
||||||
else -> {
|
else -> {
|
||||||
|
// Should only happen when shouldShowHiddenEvents() settings is ON
|
||||||
Timber.v("Type ${event.root.getClearType()} not handled")
|
Timber.v("Type ${event.root.getClearType()} not handled")
|
||||||
null
|
defaultItemFactory.create(event, highlight, callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (throwable: Throwable) {
|
} catch (throwable: Throwable) {
|
||||||
|
|
|
@ -42,11 +42,6 @@ object TimelineDisplayableEvents {
|
||||||
EventType.STATE_ROOM_TOMBSTONE,
|
EventType.STATE_ROOM_TOMBSTONE,
|
||||||
EventType.STATE_ROOM_JOIN_RULES
|
EventType.STATE_ROOM_JOIN_RULES
|
||||||
)
|
)
|
||||||
|
|
||||||
val DEBUG_DISPLAYABLE_TYPES = DISPLAYABLE_TYPES + listOf(
|
|
||||||
EventType.REDACTION,
|
|
||||||
EventType.REACTION
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun TimelineEvent.canBeMerged(): Boolean {
|
fun TimelineEvent.canBeMerged(): Boolean {
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
android:summary="@string/settings_developer_mode_fail_fast_summary"
|
android:summary="@string/settings_developer_mode_fail_fast_summary"
|
||||||
android:title="@string/settings_developer_mode_fail_fast_title" />
|
android:title="@string/settings_developer_mode_fail_fast_title" />
|
||||||
|
|
||||||
<!-- TODO Display unsupported events -->
|
|
||||||
|
|
||||||
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
||||||
|
|
||||||
<im.vector.riotx.core.preference.VectorPreferenceCategory
|
<im.vector.riotx.core.preference.VectorPreferenceCategory
|
||||||
|
|
Loading…
Add table
Reference in a new issue