🐛 Bug fixes

This commit is contained in:
LittleSheep 2025-01-21 15:04:55 +08:00
parent fbb486b90b
commit ed0334fcda
2 changed files with 76 additions and 83 deletions

View File

@ -196,10 +196,8 @@ class _AttachmentListState extends State<AttachmentList> {
);
}
return AspectRatio(
aspectRatio: widget.data.isNotEmpty ? widget.data.first?.data['ratio']?.toDouble() ?? 1 : 1,
child: Container(
constraints: constraints,
return Container(
constraints: BoxConstraints(maxHeight: constraints.maxHeight),
child: ScrollConfiguration(
behavior: _AttachmentListScrollBehavior(),
child: ListView.separated(
@ -216,8 +214,7 @@ class _AttachmentListState extends State<AttachmentList> {
if (widget.data[idx]?.mediaType != SnMediaType.image) return;
context.pushTransparentRoute(
AttachmentZoomView(
data:
widget.data.where((ele) => ele != null && ele.mediaType == SnMediaType.image).cast(),
data: widget.data.where((ele) => ele != null && ele.mediaType == SnMediaType.image).cast(),
initialIndex: idx,
heroTags: heroTags,
),
@ -263,7 +260,6 @@ class _AttachmentListState extends State<AttachmentList> {
scrollDirection: Axis.horizontal,
),
),
),
);
},
);

View File

@ -110,7 +110,8 @@ class AppRootScaffold extends StatelessWidget {
Column(
children: [
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS))
Container(
WindowTitleBarBox(
child: Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -119,22 +120,18 @@ class AppRootScaffold extends StatelessWidget {
),
),
),
child: MoveWindow(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: Platform.isMacOS ? MainAxisAlignment.center : MainAxisAlignment.start,
children: [
WindowTitleBarBox(
child: MoveWindow(
child: Text(
Text(
'Solar Network',
style: GoogleFonts.spaceGrotesk(),
).padding(horizontal: 12, vertical: 5),
),
),
if (!Platform.isMacOS)
Expanded(
child: WindowTitleBarBox(
child: Row(
Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(child: MoveWindow()),
Row(
@ -146,11 +143,11 @@ class AppRootScaffold extends StatelessWidget {
),
],
),
),
),
],
),
),
),
),
Expanded(child: innerWidget),
],
),