working edits
This commit is contained in:
parent
9663995114
commit
f9f4a4b48e
4 changed files with 19 additions and 5 deletions
|
|
@ -35,9 +35,13 @@ class ChatBox extends HookConsumerWidget {
|
|||
relatedMessage is TextMessage &&
|
||||
controller.value.text.isEmpty) {
|
||||
final text = (relatedMessage as TextMessage).text;
|
||||
controller.value.text = relatedMessage?.replyToMessageId == null
|
||||
final splitText = relatedMessage?.replyToMessageId == null
|
||||
? text
|
||||
: text.split("\n\n").sublist(1).join("\n\n");
|
||||
final notEmpty = splitText.isEmpty ? text : splitText;
|
||||
controller.value.text = notEmpty.startsWith("* ")
|
||||
? notEmpty.substring(2)
|
||||
: notEmpty;
|
||||
}
|
||||
|
||||
void send() {
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ class RoomChat extends HookConsumerWidget {
|
|||
title: Text("Reply"),
|
||||
),
|
||||
),
|
||||
// Should check if is state event (has state_key), if so, don't show edit option
|
||||
if (message.authorId == room.roomData.client.userID)
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue