From c6866787cca9eb60f77081db8d8279c5b512a16d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 05:34:12 +0000 Subject: [PATCH 1/3] Bump kluent from 1.71 to 1.72 Bumps [kluent](https://github.com/MarkusAmshove/Kluent) from 1.71 to 1.72. - [Release notes](https://github.com/MarkusAmshove/Kluent/releases) - [Changelog](https://github.com/MarkusAmshove/Kluent/blob/master/CHANGELOG.md) - [Commits](https://github.com/MarkusAmshove/Kluent/compare/v1.71...v1.72) --- updated-dependencies: - dependency-name: org.amshove.kluent:kluent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.gradle b/dependencies.gradle index 6b00507..420d9b9 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -146,7 +146,7 @@ ext.Dependencies.with { accompanistSystemuicontroller = "com.google.accompanist:accompanist-systemuicontroller:0.25.1" 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' matrixOlm = "org.matrix.android:olm-sdk:3.2.12" From 173591e6bb7878489d049b1dbed1545e383622fd Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 24 Oct 2022 20:11:03 +0100 Subject: [PATCH 2/3] updating version for release --- version.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.json b/version.json index 06414af..2fa8509 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "code": 22, - "name": "17/10/2022-V1" + "code": 23, + "name": "24/10/2022-V1" } \ No newline at end of file From c25171eeca49f5c5ba9739f2ffd29298f6572116 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 24 Oct 2022 22:11:47 +0100 Subject: [PATCH 3/3] fixing wrong author name in replies --- .../app/dapk/st/messenger/MessengerScreen.kt | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/features/messenger/src/main/kotlin/app/dapk/st/messenger/MessengerScreen.kt b/features/messenger/src/main/kotlin/app/dapk/st/messenger/MessengerScreen.kt index 6fe4ce1..b560f40 100644 --- a/features/messenger/src/main/kotlin/app/dapk/st/messenger/MessengerScreen.kt +++ b/features/messenger/src/main/kotlin/app/dapk/st/messenger/MessengerScreen.kt @@ -8,7 +8,6 @@ import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable -import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.* import androidx.compose.foundation.shape.CircleShape @@ -200,29 +199,31 @@ private fun ColumnScope.RoomContent(self: UserId, state: RoomState, messageActio wasPreviousMessageSameSender = wasPreviousMessageSameSender, 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) } - MessageBubble(this, item.toModel(event), status, onLongClick = messageActions.onLongClick) + MessageBubble(this, item.toModel(), status, onLongClick = messageActions.onLongClick) } } } } @Composable -private fun RoomEvent.toModel(event: BubbleModel.Event): BubbleModel = when (this) { - is RoomEvent.Message -> BubbleModel.Text(this.content, event) - is RoomEvent.Encrypted -> BubbleModel.Encrypted(event) - is RoomEvent.Image -> { - val imageRequest = LocalImageRequestFactory.current - .memoryCacheKey(this.imageMeta.url) - .data(this) - .build() - val imageContent = BubbleModel.Image.ImageContent(this.imageMeta.width, this.imageMeta.height, this.imageMeta.url) - BubbleModel.Image(imageContent, imageRequest, event) - } +private fun RoomEvent.toModel(): BubbleModel { + val event = BubbleModel.Event(this.author.id.value, this.author.displayName ?: this.author.id.value, this.edited, this.time) + return when (this) { + is RoomEvent.Message -> BubbleModel.Text(this.content, event) + is RoomEvent.Encrypted -> BubbleModel.Encrypted(event) + is RoomEvent.Image -> { + val imageRequest = LocalImageRequestFactory.current + .memoryCacheKey(this.imageMeta.url) + .data(this) + .build() + val imageContent = BubbleModel.Image.ImageContent(this.imageMeta.width, this.imageMeta.height, this.imageMeta.url) + BubbleModel.Image(imageContent, imageRequest, event) + } - is RoomEvent.Reply -> { - BubbleModel.Reply(this.replyingTo.toModel(event), this.message.toModel(event)) + is RoomEvent.Reply -> { + BubbleModel.Reply(this.replyingTo.toModel(), this.message.toModel()) + } } }