♻️ Rebuilt the context menu

This commit is contained in:
2025-04-26 18:35:17 +08:00
parent a7d4975e18
commit 1d52b8b5ed
6 changed files with 164 additions and 59 deletions

View File

@ -48,7 +48,12 @@ class ExploreScreen extends ConsumerWidget {
onFetchData: controller.fetchMore,
itemBuilder: (context, index) {
final post = controller.posts[index];
return PostItem(item: post);
return PostItem(
item: post,
onRefresh: (_) {
ref.invalidate(postListProvider);
},
);
},
separatorBuilder: (_, __) => const Divider(height: 1),
),

View File

@ -131,7 +131,7 @@ class PostComposeScreen extends HookConsumerWidget {
attachmentProgress.value = {...attachmentProgress.value, index: 0};
final cloudFile =
await putMediaToCloud(
fileData: attachment,
fileData: attachment.data,
atk: atk,
baseUrl: baseUrl,
filename: attachment.data.name ?? 'Post media',

View File

@ -38,7 +38,7 @@ class PostDetailScreen extends HookConsumerWidget {
children: [
Column(
children: [
PostItem(item: post!),
PostItem(item: post!, isOpenable: false),
const Divider(height: 1),
Expanded(child: PostRepliesList(postId: id)),
Gap(MediaQuery.of(context).padding.bottom),