diff --git a/lib/pages/chat_list/chat_list_body.dart b/lib/pages/chat_list/chat_list_body.dart index 6f374ab5..95e6ccff 100644 --- a/lib/pages/chat_list/chat_list_body.dart +++ b/lib/pages/chat_list/chat_list_body.dart @@ -42,6 +42,9 @@ class ChatListViewBody extends StatelessWidget { ); }, child: StreamBuilder( + key: ValueKey(client.userID.toString() + + controller.activeFilter.toString() + + controller.activeSpaceId.toString()), stream: client.onSync.stream .where((s) => s.hasRoomUpdate) .rateLimit(const Duration(seconds: 1)), @@ -55,8 +58,6 @@ class ChatListViewBody extends StatelessWidget { ActiveFilter.messages, }.contains(controller.activeFilter); return ListView.builder( - key: ValueKey(client.userID.toString() + - controller.activeFilter.toString()), controller: controller.scrollController, // add +1 space below in order to properly scroll below the spaces bar itemCount: rooms.length + 1, diff --git a/lib/widgets/fluffy_chat_app.dart b/lib/widgets/fluffy_chat_app.dart index 1dadf74d..68420077 100644 --- a/lib/widgets/fluffy_chat_app.dart +++ b/lib/widgets/fluffy_chat_app.dart @@ -17,7 +17,7 @@ class FluffyChatApp extends StatefulWidget { final Widget? testWidget; final List clients; final Map? queryParameters; - static final GlobalKey routerKey = GlobalKey(); + static GlobalKey routerKey = GlobalKey(); const FluffyChatApp({ Key? key, this.testWidget, @@ -68,6 +68,7 @@ class FluffyChatAppState extends State { setState(() { _initialUrl = FluffyChatApp.routerKey.currentState?.url; columnMode = isColumnMode; + FluffyChatApp.routerKey = GlobalKey(); }); }); }