Use gomuks editSource
This commit is contained in:
parent
2b4da17a35
commit
f4eea1b882
3 changed files with 3 additions and 8 deletions
|
|
@ -34,14 +34,7 @@ class ChatBox extends HookConsumerWidget {
|
|||
if (relationType == RelationType.edit &&
|
||||
relatedMessage is TextMessage &&
|
||||
controller.value.text.isEmpty) {
|
||||
final text = (relatedMessage as TextMessage).text;
|
||||
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;
|
||||
controller.value.text = relatedMessage?.metadata?["editSource"];
|
||||
}
|
||||
|
||||
void send() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue