From d044fdb93ad81d28e5954a297a97d32a1e050b31 Mon Sep 17 00:00:00 2001 From: Hamlet Jiang Su Date: Thu, 16 Jan 2025 20:53:31 -0800 Subject: [PATCH] fix: fix layout jank when scrolling back up to post body --- lib/post/widgets/post_view.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/post/widgets/post_view.dart b/lib/post/widgets/post_view.dart index e502362d7..df0029c2e 100644 --- a/lib/post/widgets/post_view.dart +++ b/lib/post/widgets/post_view.dart @@ -80,7 +80,10 @@ class PostSubview extends StatefulWidget { State createState() => _PostSubviewState(); } -class _PostSubviewState extends State with SingleTickerProviderStateMixin { +class _PostSubviewState extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { + @override + bool get wantKeepAlive => true; + final ExpandableController expandableController = ExpandableController(initialExpanded: true); late PostViewMedia postViewMedia; final FocusNode _selectableRegionFocusNode = FocusNode();