💄 Optimize post detail

This commit is contained in:
2026-01-17 22:33:27 +08:00
parent 3d7e7951a2
commit bc4fddc164

View File

@@ -518,7 +518,7 @@ class _PostDetailLargeScreenLayout extends StatelessWidget {
), ),
), ),
), ),
PostRepliesList(postId: postId, maxWidth: 800), PostRepliesList(postId: postId, maxWidth: 680),
SliverGap(MediaQuery.of(context).padding.bottom + 80), SliverGap(MediaQuery.of(context).padding.bottom + 80),
], ],
), ),
@@ -529,11 +529,13 @@ class _PostDetailLargeScreenLayout extends StatelessWidget {
left: 16, left: 16,
right: 16, right: 16,
child: ConstrainedBox( child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 800), constraints: BoxConstraints(maxWidth: 680),
child: PostQuickReply( child: PostQuickReply(
parent: post, parent: post,
onPosted: () { onPosted: () {
ref.read(postRepliesProvider(postId).notifier).refresh(); ref
.read(postRepliesProvider(postId).notifier)
.refresh();
}, },
), ),
).center(), ).center(),
@@ -594,7 +596,7 @@ class PostDetailScreen extends HookConsumerWidget {
SliverToBoxAdapter( SliverToBoxAdapter(
child: Center( child: Center(
child: ConstrainedBox( child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 800), constraints: BoxConstraints(maxWidth: 680),
child: PostItem( child: PostItem(
item: post!, item: post!,
isFullPost: true, isFullPost: true,
@@ -612,7 +614,7 @@ class PostDetailScreen extends HookConsumerWidget {
SliverToBoxAdapter( SliverToBoxAdapter(
child: Center( child: Center(
child: ConstrainedBox( child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 800), constraints: BoxConstraints(maxWidth: 680),
child: PostActionButtons( child: PostActionButtons(
post: post, post: post,
renderingPadding: const EdgeInsets.symmetric( renderingPadding: const EdgeInsets.symmetric(
@@ -633,7 +635,7 @@ class PostDetailScreen extends HookConsumerWidget {
), ),
), ),
), ),
PostRepliesList(postId: id, maxWidth: 800), PostRepliesList(postId: id, maxWidth: 680),
SliverGap(MediaQuery.of(context).padding.bottom + 80), SliverGap(MediaQuery.of(context).padding.bottom + 80),
], ],
), ),
@@ -644,7 +646,7 @@ class PostDetailScreen extends HookConsumerWidget {
left: 16, left: 16,
right: 16, right: 16,
child: ConstrainedBox( child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 800), constraints: BoxConstraints(maxWidth: 680),
child: postState.when( child: postState.when(
data: (post) => PostQuickReply( data: (post) => PostQuickReply(
parent: post!, parent: post!,