Fix mentions UI within threads

This commit is contained in:
ariskotsomitopoulos 2022-01-20 13:02:35 +02:00
parent 35ee72aac0
commit e0630ceac0
3 changed files with 4 additions and 4 deletions

View file

@ -192,7 +192,7 @@ internal class DefaultRelationService @AssistedInject constructor(
eventFactory.createThreadTextEvent(
rootThreadEventId = rootThreadEventId,
roomId = roomId,
text = replyInThreadText.toString(),
text = replyInThreadText,
msgType = msgType,
autoMarkdown = autoMarkdown,
formattedText = formattedText)

View file

@ -396,11 +396,11 @@ internal class LocalEchoEventFactory @Inject constructor(
fun createThreadTextEvent(
rootThreadEventId: String,
roomId: String,
text: String,
text: CharSequence,
msgType: String,
autoMarkdown: Boolean,
formattedText: String?): Event {
val content = formattedText?.let { TextContent(text, it) } ?: createTextContent(text, autoMarkdown)
val content = formattedText?.let { TextContent(text.toString(), it) } ?: createTextContent(text, autoMarkdown)
return createEvent(
roomId,
EventType.MESSAGE,

View file

@ -191,7 +191,7 @@ class MessageComposerViewModel @AssistedInject constructor(
if (state.rootThreadEventId != null) {
room.replyInThread(
rootThreadEventId = state.rootThreadEventId,
replyInThreadText = action.text.toString(),
replyInThreadText = action.text,
autoMarkdown = action.autoMarkdown)
} else {
room.sendTextMessage(action.text, autoMarkdown = action.autoMarkdown)