Show pinned posts on realms, publishers

This commit is contained in:
2025-08-25 17:09:24 +08:00
parent f9b2a96c7c
commit 709a0620b6
4 changed files with 37 additions and 30 deletions

View File

@@ -356,6 +356,7 @@ class PublisherProfileScreen extends HookConsumerWidget {
SliverPostList(
key: ValueKey(categoryTab.value),
pubName: name,
pinned: false,
type: switch (categoryTab.value) {
1 => 0,
2 => 1,
@@ -438,10 +439,12 @@ class PublisherProfileScreen extends HookConsumerWidget {
child: publisherVerificationWidget(data),
),
SliverToBoxAdapter(child: publisherBioWidget(data)),
SliverPostList(pubName: name, pinned: true),
SliverToBoxAdapter(child: publisherCategoryTabWidget()),
SliverPostList(
key: ValueKey(categoryTab.value),
pubName: name,
pinned: false,
type: switch (categoryTab.value) {
1 => 0,
2 => 1,

View File

@@ -244,7 +244,10 @@ class RealmDetailScreen extends HookConsumerWidget {
Flexible(
flex: 3,
child: CustomScrollView(
slivers: [SliverPostList(realm: slug)],
slivers: [
SliverPostList(realm: slug, pinned: true),
SliverPostList(realm: slug, pinned: false),
],
),
),
Flexible(
@@ -359,7 +362,8 @@ class RealmDetailScreen extends HookConsumerWidget {
SliverToBoxAdapter(
child: realmChatRoomListWidget(realm),
),
SliverPostList(realm: slug),
SliverPostList(realm: slug, pinned: true),
SliverPostList(realm: slug, pinned: false),
],
),
),