diff --git a/lib/screens/explore.dart b/lib/screens/explore.dart index d85d66d..2b75f4b 100644 --- a/lib/screens/explore.dart +++ b/lib/screens/explore.dart @@ -218,6 +218,11 @@ class ExploreScreen extends HookConsumerWidget { right: 12, top: 16, ), + onChecked: () { + ref.invalidate( + eventCalendarProvider(query.value), + ); + }, ), Card( margin: EdgeInsets.only(left: 8, right: 12, top: 8), diff --git a/lib/widgets/check_in.dart b/lib/widgets/check_in.dart index a8f4f9f..1a39cb8 100644 --- a/lib/widgets/check_in.dart +++ b/lib/widgets/check_in.dart @@ -36,7 +36,8 @@ Future checkInResultToday(Ref ref) async { class CheckInWidget extends HookConsumerWidget { final EdgeInsets? margin; - const CheckInWidget({super.key, this.margin}); + final VoidCallback? onChecked; + const CheckInWidget({super.key, this.margin, this.onChecked}); @override Widget build(BuildContext context, WidgetRef ref) { @@ -52,6 +53,7 @@ class CheckInWidget extends HookConsumerWidget { ref.invalidate(checkInResultTodayProvider); final userNotifier = ref.read(userInfoProvider.notifier); userNotifier.fetchUser(); + onChecked?.call(); } catch (err) { if (err is DioException) { if (err.response?.statusCode == 423 && context.mounted) { diff --git a/lib/widgets/post/post_item.dart b/lib/widgets/post/post_item.dart index 53e8f41..68e4128 100644 --- a/lib/widgets/post/post_item.dart +++ b/lib/widgets/post/post_item.dart @@ -772,7 +772,7 @@ class PostReplyPreview extends HookConsumerWidget { final posts = useState>([]); final loading = useState(false); - Future fetchMoreReplies({int pageSize = 1}) async { + Future fetchMoreReplies({int pageSize = 3}) async { final client = ref.read(apiClientProvider); loading.value = true; @@ -943,7 +943,6 @@ class PostReplyPreview extends HookConsumerWidget { children: [ Text('repliesCount') .plural(parent.repliesCount) - .tr() .fontSize(15) .bold() .padding(horizontal: 5),