Update rust sdk to 0.1.31: fix build
This commit is contained in:
parent
6622889b09
commit
ed779abead
8 changed files with 14 additions and 14 deletions
|
|
@ -97,7 +97,7 @@ internal fun aTimelineItemList(content: TimelineItemEventContent): ImmutableList
|
|||
}
|
||||
|
||||
fun aTimelineItemDaySeparator(): TimelineItem.Virtual {
|
||||
return TimelineItem.Virtual(UUID.randomUUID().mostSignificantBits, aTimelineItemDaySeparatorModel("Today"))
|
||||
return TimelineItem.Virtual(UUID.randomUUID().toString(), aTimelineItemDaySeparatorModel("Today"))
|
||||
}
|
||||
|
||||
internal fun aTimelineItemEvent(
|
||||
|
|
@ -112,7 +112,7 @@ internal fun aTimelineItemEvent(
|
|||
timelineItemReactions: TimelineItemReactions = aTimelineItemReactions(),
|
||||
): TimelineItem.Event {
|
||||
return TimelineItem.Event(
|
||||
id = UUID.randomUUID().mostSignificantBits,
|
||||
id = UUID.randomUUID().toString(),
|
||||
eventId = eventId,
|
||||
transactionId = transactionId,
|
||||
senderId = UserId("@senderId:domain"),
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class TimelineItemEventFactory @Inject constructor(
|
|||
size = AvatarSize.TimelineSender
|
||||
)
|
||||
return TimelineItem.Event(
|
||||
id = currentTimelineItem.uniqueId,
|
||||
id = currentTimelineItem.uniqueId.toString(),
|
||||
eventId = currentTimelineItem.eventId,
|
||||
transactionId = currentTimelineItem.transactionId,
|
||||
senderId = currentSender,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class TimelineItemVirtualFactory @Inject constructor(
|
|||
virtualTimelineItem: MatrixTimelineItem.Virtual,
|
||||
): TimelineItem.Virtual {
|
||||
return TimelineItem.Virtual(
|
||||
id = virtualTimelineItem.uniqueId,
|
||||
id = virtualTimelineItem.uniqueId.toString(),
|
||||
model = virtualTimelineItem.computeModel()
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ import kotlinx.collections.immutable.ImmutableList
|
|||
sealed interface TimelineItem {
|
||||
|
||||
fun identifier(): String = when (this) {
|
||||
is Event -> id.toString()
|
||||
is Virtual -> id.toString()
|
||||
is Event -> id
|
||||
is Virtual -> id
|
||||
is GroupedEvents -> id
|
||||
}
|
||||
|
||||
|
|
@ -45,13 +45,13 @@ sealed interface TimelineItem {
|
|||
|
||||
@Immutable
|
||||
data class Virtual(
|
||||
val id: Long,
|
||||
val id: String,
|
||||
val model: TimelineItemVirtualModel
|
||||
) : TimelineItem
|
||||
|
||||
@Immutable
|
||||
data class Event(
|
||||
val id: Long,
|
||||
val id: String,
|
||||
val eventId: EventId? = null,
|
||||
val transactionId: String? = null,
|
||||
val senderId: UserId,
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class TimelinePresenterTest {
|
|||
fun `present - on scroll finished send read receipt if an event is before the index`() = runTest {
|
||||
val timeline = FakeMatrixTimeline()
|
||||
val timelineItemsFactory = aTimelineItemsFactory().apply {
|
||||
replaceWith(listOf(MatrixTimelineItem.Event(anEventTimelineItem())))
|
||||
replaceWith(listOf(MatrixTimelineItem.Event(0, anEventTimelineItem())))
|
||||
}
|
||||
val room = FakeMatrixRoom(matrixTimeline = timeline)
|
||||
val presenter = TimelinePresenter(
|
||||
|
|
@ -119,7 +119,7 @@ class TimelinePresenterTest {
|
|||
fun `present - on scroll finished will not send read receipt no event is before the index`() = runTest {
|
||||
val timeline = FakeMatrixTimeline()
|
||||
val timelineItemsFactory = aTimelineItemsFactory().apply {
|
||||
replaceWith(listOf(MatrixTimelineItem.Event(anEventTimelineItem())))
|
||||
replaceWith(listOf(MatrixTimelineItem.Event(0, anEventTimelineItem())))
|
||||
}
|
||||
val room = FakeMatrixRoom(matrixTimeline = timeline)
|
||||
val presenter = TimelinePresenter(
|
||||
|
|
@ -142,7 +142,7 @@ class TimelinePresenterTest {
|
|||
fun `present - on scroll finished will not send read receipt only virtual events exist before the index`() = runTest {
|
||||
val timeline = FakeMatrixTimeline()
|
||||
val timelineItemsFactory = aTimelineItemsFactory().apply {
|
||||
replaceWith(listOf(MatrixTimelineItem.Virtual(VirtualTimelineItem.ReadMarker)))
|
||||
replaceWith(listOf(MatrixTimelineItem.Virtual(0, VirtualTimelineItem.ReadMarker)))
|
||||
}
|
||||
val room = FakeMatrixRoom(matrixTimeline = timeline)
|
||||
val presenter = TimelinePresenter(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue