Use Clock (SDK API change)
This commit is contained in:
parent
6a61e639e0
commit
45526c0e3a
|
@ -31,6 +31,7 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
|
||||||
import im.vector.app.core.files.LocalFilesHelper
|
import im.vector.app.core.files.LocalFilesHelper
|
||||||
import im.vector.app.core.resources.ColorProvider
|
import im.vector.app.core.resources.ColorProvider
|
||||||
import im.vector.app.core.resources.StringProvider
|
import im.vector.app.core.resources.StringProvider
|
||||||
|
import im.vector.app.core.time.Clock
|
||||||
import im.vector.app.core.utils.DimensionConverter
|
import im.vector.app.core.utils.DimensionConverter
|
||||||
import im.vector.app.core.utils.containsOnlyEmojis
|
import im.vector.app.core.utils.containsOnlyEmojis
|
||||||
import im.vector.app.features.home.room.detail.timeline.TimelineEventController
|
import im.vector.app.features.home.room.detail.timeline.TimelineEventController
|
||||||
|
@ -142,6 +143,7 @@ class MessageItemFactory @Inject constructor(
|
||||||
private val lightweightSettingsStorage: LightweightSettingsStorage,
|
private val lightweightSettingsStorage: LightweightSettingsStorage,
|
||||||
private val spanUtils: SpanUtils,
|
private val spanUtils: SpanUtils,
|
||||||
private val session: Session,
|
private val session: Session,
|
||||||
|
private val clock: Clock,
|
||||||
private val audioMessagePlaybackTracker: AudioMessagePlaybackTracker,
|
private val audioMessagePlaybackTracker: AudioMessagePlaybackTracker,
|
||||||
private val locationPinProvider: LocationPinProvider,
|
private val locationPinProvider: LocationPinProvider,
|
||||||
private val vectorPreferences: VectorPreferences,
|
private val vectorPreferences: VectorPreferences,
|
||||||
|
@ -457,6 +459,7 @@ class MessageItemFactory @Inject constructor(
|
||||||
reactionsSummaryEvents = attributes.reactionsSummaryEvents,
|
reactionsSummaryEvents = attributes.reactionsSummaryEvents,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
.clock(clock)
|
||||||
.callback(callback)
|
.callback(callback)
|
||||||
.highlighted(highlight)
|
.highlighted(highlight)
|
||||||
.leftGuideline(avatarSizeProvider.leftGuideline)
|
.leftGuideline(avatarSizeProvider.leftGuideline)
|
||||||
|
|
|
@ -31,6 +31,7 @@ import com.airbnb.epoxy.EpoxyModelClass
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.core.epoxy.ClickListener
|
import im.vector.app.core.epoxy.ClickListener
|
||||||
import im.vector.app.core.epoxy.onClick
|
import im.vector.app.core.epoxy.onClick
|
||||||
|
import im.vector.app.core.time.Clock
|
||||||
import im.vector.app.features.home.AvatarRenderer
|
import im.vector.app.features.home.AvatarRenderer
|
||||||
import im.vector.app.features.home.room.detail.RoomDetailAction
|
import im.vector.app.features.home.room.detail.RoomDetailAction
|
||||||
import im.vector.app.features.home.room.detail.timeline.MessageColorProvider
|
import im.vector.app.features.home.room.detail.timeline.MessageColorProvider
|
||||||
|
@ -47,6 +48,9 @@ abstract class VerificationRequestItem : AbsBaseMessageItem<VerificationRequestI
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
lateinit var attributes: Attributes
|
lateinit var attributes: Attributes
|
||||||
|
|
||||||
|
@EpoxyAttribute
|
||||||
|
lateinit var clock: Clock
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
var callback: TimelineEventController.Callback? = null
|
var callback: TimelineEventController.Callback? = null
|
||||||
|
|
||||||
|
@ -107,7 +111,7 @@ abstract class VerificationRequestItem : AbsBaseMessageItem<VerificationRequestI
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always hide buttons if request is too old
|
// Always hide buttons if request is too old
|
||||||
if (!VerificationService.isValidRequest(attributes.informationData.ageLocalTS)) {
|
if (!VerificationService.isValidRequest(attributes.informationData.ageLocalTS, clock.epochMillis())) {
|
||||||
holder.buttonBar.isVisible = false
|
holder.buttonBar.isVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue