Subscribe to category and tags

This commit is contained in:
2025-08-25 16:15:51 +08:00
parent 96c2f45c85
commit c7f5b63fe5
5 changed files with 346 additions and 50 deletions

View File

@@ -83,6 +83,7 @@ class SliverPostList extends HookConsumerWidget {
final bool isOpenable;
final Function? onRefresh;
final Function(SnPost)? onUpdate;
final double? maxWidth;
const SliverPostList({
super.key,
@@ -98,6 +99,7 @@ class SliverPostList extends HookConsumerWidget {
this.isOpenable = true,
this.onRefresh,
this.onUpdate,
this.maxWidth,
});
@override
@@ -139,6 +141,15 @@ class SliverPostList extends HookConsumerWidget {
final post = data.items[index];
if (maxWidth != null) {
return Center(
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: maxWidth!),
child: _buildPostItem(post),
),
);
}
return _buildPostItem(post);
},
),