Fix crash: MergedHeaderItem was missing dimensionConverter

This commit is contained in:
Benoit Marty 2019-09-24 14:23:13 +02:00
parent cc832633a5
commit 1e963bc0dc
3 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,9 @@
Changes in RiotX 0.6.1 (2019-09-24)
===================================================
Bugfix:
- Fix crash: MergedHeaderItem was missing dimensionConverter
Changes in RiotX 0.6.0 (2019-09-24)
===================================================

View file

@ -16,7 +16,7 @@ androidExtensions {
ext.versionMajor = 0
ext.versionMinor = 6
ext.versionPatch = 0
ext.versionPatch = 1
static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct'

View file

@ -31,14 +31,11 @@ import im.vector.riotx.core.date.VectorDateFormatter
import im.vector.riotx.core.epoxy.LoadingItem_
import im.vector.riotx.core.extensions.localDateTime
import im.vector.riotx.core.resources.UserPreferencesProvider
import im.vector.riotx.core.utils.DimensionConverter
import im.vector.riotx.features.home.AvatarRenderer
import im.vector.riotx.features.home.room.detail.timeline.factory.TimelineItemFactory
import im.vector.riotx.features.home.room.detail.timeline.helper.*
import im.vector.riotx.features.home.room.detail.timeline.item.DaySeparatorItem
import im.vector.riotx.features.home.room.detail.timeline.item.DaySeparatorItem_
import im.vector.riotx.features.home.room.detail.timeline.item.MergedHeaderItem
import im.vector.riotx.features.home.room.detail.timeline.item.MessageInformationData
import im.vector.riotx.features.home.room.detail.timeline.item.ReadReceiptData
import im.vector.riotx.features.home.room.detail.timeline.item.*
import im.vector.riotx.features.media.ImageContentRenderer
import im.vector.riotx.features.media.VideoContentRenderer
import org.threeten.bp.LocalDateTime
@ -48,6 +45,7 @@ class TimelineEventController @Inject constructor(private val dateFormatter: Vec
private val timelineItemFactory: TimelineItemFactory,
private val timelineMediaSizeProvider: TimelineMediaSizeProvider,
private val avatarRenderer: AvatarRenderer,
private val dimensionConverter: DimensionConverter,
@TimelineEventControllerHandler
private val backgroundHandler: Handler,
userPreferencesProvider: UserPreferencesProvider
@ -312,6 +310,7 @@ class TimelineEventController @Inject constructor(private val dateFormatter: Vec
mergeItemCollapseStates[event.localId] = it
requestModelBuild()
}.also {
it.dimensionConverter = dimensionConverter
it.setOnVisibilityStateChanged(MergedTimelineEventVisibilityStateChangedListener(callback, mergedEvents))
}
}