From 6cf24cc43bea175ee609c892ac93eece32025c64 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 2 Jul 2019 12:21:27 +0200 Subject: [PATCH 1/2] Fix / some state events are missing context action (view source) --- .../matrix/android/internal/database/helper/RoomEntityHelper.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/database/helper/RoomEntityHelper.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/database/helper/RoomEntityHelper.kt index 1458b609..04921a9a 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/database/helper/RoomEntityHelper.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/database/helper/RoomEntityHelper.kt @@ -49,6 +49,7 @@ internal fun RoomEntity.addStateEvents(stateEvents: List, val eventEntity = event.toEntity(roomId).apply { this.stateIndex = stateIndex this.isUnlinked = isUnlinked + this.sendState = SendState.SYNCED } untimelinedStateEvents.add(0, eventEntity) } From 85e850bcded1b279e9f22b779d379f4116cf25b2 Mon Sep 17 00:00:00 2001 From: Valere Date: Tue, 2 Jul 2019 12:29:36 +0200 Subject: [PATCH 2/2] Fix / unwanted auto-mardown when trailing space --- .../android/internal/session/room/send/LocalEchoEventFactory.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/LocalEchoEventFactory.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/LocalEchoEventFactory.kt index 6e80e7c6..888bc0f2 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/LocalEchoEventFactory.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/LocalEchoEventFactory.kt @@ -70,7 +70,7 @@ internal class LocalEchoEventFactory @Inject constructor(private val credentials } private fun isFormattedTextPertinent(text: String, htmlText: String?) = - text != htmlText && htmlText != "

$text

\n" + text != htmlText && htmlText != "

${text.trim()}

\n" fun createFormattedTextEvent(roomId: String, text: String, formattedText: String): Event { val content = MessageTextContent(