🐛 Bug fixes on chat message rendering

This commit is contained in:
LittleSheep 2025-01-01 01:11:35 +08:00
parent f26edce071
commit 590a4ce2a6
4 changed files with 3 additions and 6 deletions

View File

@ -15,10 +15,10 @@ class AttachmentList extends StatefulWidget {
final List<SnAttachment?> data;
final bool bordered;
final bool gridded;
final bool noGrow;
final BoxFit fit;
final double? maxHeight;
final double? minWidth;
final double? maxWidth;
final EdgeInsets? padding;
const AttachmentList({
@ -26,10 +26,10 @@ class AttachmentList extends StatefulWidget {
required this.data,
this.bordered = false,
this.gridded = false,
this.noGrow = false,
this.fit = BoxFit.cover,
this.maxHeight,
this.minWidth,
this.maxWidth,
this.padding,
});

View File

@ -1,6 +1,5 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:provider/provider.dart';
import 'package:surface/controllers/post_write_controller.dart';
import 'package:surface/providers/sn_attachment.dart';

View File

@ -158,8 +158,7 @@ class ChatMessage extends StatelessWidget {
AttachmentList(
data: data.preload!.attachments!,
bordered: true,
gridded: true,
noGrow: true,
// gridded: true,
maxHeight: 560,
minWidth: 480,
padding: const EdgeInsets.only(top: 8),

View File

@ -11,7 +11,6 @@ import 'package:surface/providers/user_directory.dart';
import 'package:surface/types/attachment.dart';
import 'package:surface/types/chat.dart';
import 'package:surface/widgets/dialog.dart';
import 'package:surface/widgets/markdown_content.dart';
import 'package:surface/widgets/post/post_media_pending_list.dart';
class ChatMessageInput extends StatefulWidget {