💄 Optimize message hint

This commit is contained in:
LittleSheep 2024-08-21 15:45:55 +08:00
parent 047defebd1
commit fdc71475fc

View File

@ -239,7 +239,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
var insertText = '';
if (suggestion.type == 'emotes') {
insertText = suggestion.content;
insertText = '${suggestion.content} ';
startText = replaceText.replaceFirstMapped(
RegExp(r':(?:([-\w]+)~)?([-\w]+)$'),
(Match m) => insertText,
@ -247,7 +247,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
}
if (suggestion.type == 'users') {
insertText = suggestion.content;
insertText = '${suggestion.content} ';
startText = replaceText.replaceFirstMapped(
RegExp(r'(?:\s|^)@([-\w]+)$'),
(Match m) => insertText,