mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
The relatedTo field in RoomSendQueueUpdate.MediaUpload is a transaction id (#6002)
It was being incorrectly mapped to an event id.
This commit is contained in:
committed by
GitHub
parent
8e60d511aa
commit
2e353848f9
+1
-1
@@ -18,5 +18,5 @@ sealed interface SendQueueUpdate {
|
|||||||
data class SendError(val transactionId: TransactionId) : SendQueueUpdate
|
data class SendError(val transactionId: TransactionId) : SendQueueUpdate
|
||||||
data class RetrySendingEvent(val transactionId: TransactionId) : SendQueueUpdate
|
data class RetrySendingEvent(val transactionId: TransactionId) : SendQueueUpdate
|
||||||
data class SentEvent(val transactionId: TransactionId, val eventId: EventId) : SendQueueUpdate
|
data class SentEvent(val transactionId: TransactionId, val eventId: EventId) : SendQueueUpdate
|
||||||
data class MediaUpload(val relatedTo: EventId, val file: MediaSource?, val index: Long, val progress: Float) : SendQueueUpdate
|
data class MediaUpload(val relatedTo: TransactionId, val file: MediaSource?, val index: Long, val progress: Float) : SendQueueUpdate
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ fun RoomSendQueueUpdate.map(): SendQueueUpdate = when (this) {
|
|||||||
is RoomSendQueueUpdate.NewLocalEvent -> SendQueueUpdate.NewLocalEvent(TransactionId(transactionId))
|
is RoomSendQueueUpdate.NewLocalEvent -> SendQueueUpdate.NewLocalEvent(TransactionId(transactionId))
|
||||||
is RoomSendQueueUpdate.CancelledLocalEvent -> SendQueueUpdate.CancelledLocalEvent(TransactionId(transactionId))
|
is RoomSendQueueUpdate.CancelledLocalEvent -> SendQueueUpdate.CancelledLocalEvent(TransactionId(transactionId))
|
||||||
is RoomSendQueueUpdate.MediaUpload -> SendQueueUpdate.MediaUpload(
|
is RoomSendQueueUpdate.MediaUpload -> SendQueueUpdate.MediaUpload(
|
||||||
relatedTo = EventId(relatedTo),
|
relatedTo = TransactionId(relatedTo),
|
||||||
file = file?.map(),
|
file = file?.map(),
|
||||||
index = index.toLong(),
|
index = index.toLong(),
|
||||||
progress = progress.current.toFloat() / progress.total.toFloat(),
|
progress = progress.current.toFloat() / progress.total.toFloat(),
|
||||||
|
|||||||
Reference in New Issue
Block a user