From 950150e119e2325b4d5d66095867c69c0edce70d Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 6 Aug 2025 21:42:23 +0800 Subject: [PATCH] :bug: Fix large screen have no post category filter --- lib/screens/posts/pub_profile.dart | 17 ++++++++++++++--- lib/widgets/post/post_item.dart | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/screens/posts/pub_profile.dart b/lib/screens/posts/pub_profile.dart index c55216a..d924cd8 100644 --- a/lib/screens/posts/pub_profile.dart +++ b/lib/screens/posts/pub_profile.dart @@ -337,7 +337,18 @@ class PublisherProfileScreen extends HookConsumerWidget { child: CustomScrollView( slivers: [ SliverGap(16), - SliverPostList(pubName: name), + SliverToBoxAdapter( + child: publisherCategoryTabWidget(), + ), + SliverPostList( + key: ValueKey(categoryTab.value), + pubName: name, + type: switch (categoryTab.value) { + 1 => 0, + 2 => 1, + _ => null, + }, + ), SliverGap( MediaQuery.of(context).padding.bottom + 16, ), @@ -350,9 +361,9 @@ class PublisherProfileScreen extends HookConsumerWidget { alignment: Alignment.topLeft, child: SingleChildScrollView( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - publisherBasisWidget(data), + publisherBasisWidget(data).padding(bottom: 8), publisherBadgesWidget(data), publisherVerificationWidget(data), publisherBioWidget(data), diff --git a/lib/widgets/post/post_item.dart b/lib/widgets/post/post_item.dart index 68e4128..9c1e5fe 100644 --- a/lib/widgets/post/post_item.dart +++ b/lib/widgets/post/post_item.dart @@ -535,7 +535,7 @@ class PostItem extends HookConsumerWidget { right: renderingPadding.horizontal, ), ), - if (item.attachments.isNotEmpty) + if (item.attachments.isNotEmpty && item.type != 1) CloudFileList( files: item.attachments, padding: EdgeInsets.symmetric(