diff --git a/lib/post/pages/post_page.dart b/lib/post/pages/post_page.dart index ea0849b73..72579d749 100644 --- a/lib/post/pages/post_page.dart +++ b/lib/post/pages/post_page.dart @@ -60,6 +60,18 @@ class _PostPageState extends State { /// Whether the user changed during the course of viewing the post bool userChanged = false; + @override + void initState() { + super.initState(); + + scrollController.addListener(() { + // Fetches new comments when the user has scrolled past 70% list + if (scrollController.position.pixels > scrollController.position.maxScrollExtent * 0.7 && context.read().state.status == PostStatus.success) { + context.read().add(const GetPostCommentsEvent()); + } + }); + } + @override Widget build(BuildContext context) { final theme = Theme.of(context);