Bug fixes

This commit is contained in:
LittleSheep 2024-12-29 12:09:04 +08:00
parent f6cf6d0440
commit 95d926b29f
2 changed files with 6 additions and 5 deletions

View File

@ -324,7 +324,9 @@ class _AttachmentItemContentVideoState extends State<_AttachmentItemContentVideo
MaterialDesktopCustomButton( MaterialDesktopCustomButton(
iconSize: 24, iconSize: 24,
onPressed: _toggleOriginal, onPressed: _toggleOriginal,
icon: _showOriginal ? const Icon(Symbols.high_quality, size: 24) : const Icon(Symbols.sd, size: 24), icon: Builder(builder: (context) {
return _showOriginal ? const Icon(Symbols.high_quality, size: 24) : const Icon(Symbols.sd, size: 24);
}),
), ),
], ],
), ),

View File

@ -334,7 +334,6 @@ class PostShareImageWidget extends StatelessWidget {
_PostQuoteContent( _PostQuoteContent(
child: data.repostTo!, child: data.repostTo!,
isRelativeDate: false, isRelativeDate: false,
isFlatted: true,
).padding(horizontal: 16, bottom: 8), ).padding(horizontal: 16, bottom: 8),
if (data.type != 'article' && (data.preload?.attachments?.isNotEmpty ?? false)) if (data.type != 'article' && (data.preload?.attachments?.isNotEmpty ?? false))
AttachmentList( AttachmentList(
@ -886,11 +885,9 @@ class _PostContentBody extends StatelessWidget {
class _PostQuoteContent extends StatelessWidget { class _PostQuoteContent extends StatelessWidget {
final SnPost child; final SnPost child;
final bool isRelativeDate; final bool isRelativeDate;
final bool isFlatted;
const _PostQuoteContent({ const _PostQuoteContent({
this.isRelativeDate = true, this.isRelativeDate = true,
this.isFlatted = false,
required this.child, required this.child,
}); });
@ -932,7 +929,9 @@ class _PostQuoteContent extends StatelessWidget {
), ),
child: AttachmentList( child: AttachmentList(
data: child.preload!.attachments!, data: child.preload!.attachments!,
gridded: isFlatted, maxHeight: 360,
fit: BoxFit.contain,
gridded: true,
listPadding: const EdgeInsets.symmetric(horizontal: 12), listPadding: const EdgeInsets.symmetric(horizontal: 12),
), ),
).padding( ).padding(