Merge pull request #227 from ouchadam/release-candidate
[Auto] Release Candidate
This commit is contained in:
commit
b884ecb69a
|
@ -146,7 +146,7 @@ ext.Dependencies.with {
|
||||||
accompanistSystemuicontroller = "com.google.accompanist:accompanist-systemuicontroller:0.25.1"
|
accompanistSystemuicontroller = "com.google.accompanist:accompanist-systemuicontroller:0.25.1"
|
||||||
|
|
||||||
junit = "junit:junit:4.13.2"
|
junit = "junit:junit:4.13.2"
|
||||||
kluent = "org.amshove.kluent:kluent:1.71"
|
kluent = "org.amshove.kluent:kluent:1.72"
|
||||||
mockk = 'io.mockk:mockk:1.13.2'
|
mockk = 'io.mockk:mockk:1.13.2'
|
||||||
|
|
||||||
matrixOlm = "org.matrix.android:olm-sdk:3.2.12"
|
matrixOlm = "org.matrix.android:olm-sdk:3.2.12"
|
||||||
|
|
|
@ -8,7 +8,6 @@ import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.border
|
import androidx.compose.foundation.border
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.lazy.*
|
import androidx.compose.foundation.lazy.*
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
|
@ -200,29 +199,31 @@ private fun ColumnScope.RoomContent(self: UserId, state: RoomState, messageActio
|
||||||
wasPreviousMessageSameSender = wasPreviousMessageSameSender,
|
wasPreviousMessageSameSender = wasPreviousMessageSameSender,
|
||||||
onReply = { messageActions.onReply(item) },
|
onReply = { messageActions.onReply(item) },
|
||||||
) {
|
) {
|
||||||
val event = BubbleModel.Event(item.author.id.value, item.author.displayName ?: item.author.id.value, item.edited, item.time)
|
|
||||||
val status = @Composable { SendStatus(item) }
|
val status = @Composable { SendStatus(item) }
|
||||||
MessageBubble(this, item.toModel(event), status, onLongClick = messageActions.onLongClick)
|
MessageBubble(this, item.toModel(), status, onLongClick = messageActions.onLongClick)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun RoomEvent.toModel(event: BubbleModel.Event): BubbleModel = when (this) {
|
private fun RoomEvent.toModel(): BubbleModel {
|
||||||
is RoomEvent.Message -> BubbleModel.Text(this.content, event)
|
val event = BubbleModel.Event(this.author.id.value, this.author.displayName ?: this.author.id.value, this.edited, this.time)
|
||||||
is RoomEvent.Encrypted -> BubbleModel.Encrypted(event)
|
return when (this) {
|
||||||
is RoomEvent.Image -> {
|
is RoomEvent.Message -> BubbleModel.Text(this.content, event)
|
||||||
val imageRequest = LocalImageRequestFactory.current
|
is RoomEvent.Encrypted -> BubbleModel.Encrypted(event)
|
||||||
.memoryCacheKey(this.imageMeta.url)
|
is RoomEvent.Image -> {
|
||||||
.data(this)
|
val imageRequest = LocalImageRequestFactory.current
|
||||||
.build()
|
.memoryCacheKey(this.imageMeta.url)
|
||||||
val imageContent = BubbleModel.Image.ImageContent(this.imageMeta.width, this.imageMeta.height, this.imageMeta.url)
|
.data(this)
|
||||||
BubbleModel.Image(imageContent, imageRequest, event)
|
.build()
|
||||||
}
|
val imageContent = BubbleModel.Image.ImageContent(this.imageMeta.width, this.imageMeta.height, this.imageMeta.url)
|
||||||
|
BubbleModel.Image(imageContent, imageRequest, event)
|
||||||
|
}
|
||||||
|
|
||||||
is RoomEvent.Reply -> {
|
is RoomEvent.Reply -> {
|
||||||
BubbleModel.Reply(this.replyingTo.toModel(event), this.message.toModel(event))
|
BubbleModel.Reply(this.replyingTo.toModel(), this.message.toModel())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"code": 23,
|
"code": 24,
|
||||||
"name": "24/10/2022-V1"
|
"name": "27/10/2022-V1"
|
||||||
}
|
}
|
Loading…
Reference in New Issue