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