💄 Optimize styles

This commit is contained in:
LittleSheep 2024-08-07 01:20:23 +08:00
parent 272044a77e
commit 7c0c1ec94f
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -100,12 +100,12 @@ class MarkdownTextContent extends StatelessWidget {
width = 28; width = 28;
height = 28; height = 28;
} }
fit = BoxFit.fill; fit = BoxFit.contain;
break; break;
case 'attachments': case 'attachments':
const radius = BorderRadius.all(Radius.circular(8)); const radius = BorderRadius.all(Radius.circular(8));
return LimitedBox( return LimitedBox(
maxHeight: 360, maxHeight: MediaQuery.of(context).size.width,
child: ClipRRect( child: ClipRRect(
borderRadius: radius, borderRadius: radius,
child: AttachmentSelfContainedEntry( child: AttachmentSelfContainedEntry(