Skip to content

Commit

Permalink
fix: unbound scroll controller
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 committed Oct 1, 2022
1 parent 4f7a63b commit 171b619
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/components/chat_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ class _ChatPanelWidgetState extends State<ChatPanelWidget>
super.didUpdateWidget(oldWidget);

if (oldWidget.channel != widget.channel) {
_controller.jumpTo(0);
if (_controller.hasClients) {
_controller.jumpTo(0);
}
setState(() {
_atBottom = true;
});
Expand Down

0 comments on commit 171b619

Please sign in to comment.