cancellable waitingpage

This commit is contained in:
Christien Rioux 2024-08-03 15:53:11 -05:00
parent cbac96de99
commit ab9838f375
3 changed files with 38 additions and 15 deletions

View file

@ -122,13 +122,19 @@ class _HomeAccountReadyState extends State<HomeAccountReady> {
Material(color: Colors.transparent, child: buildUserPanel()));
Widget buildRightPane(BuildContext context) {
final activeChatLocalConversationKey =
context.watch<ActiveChatCubit>().state;
final activeChatCubit = context.watch<ActiveChatCubit>();
final activeChatLocalConversationKey = activeChatCubit.state;
if (activeChatLocalConversationKey == null) {
return const NoConversationWidget();
}
return ChatComponentWidget(
localConversationRecordKey: activeChatLocalConversationKey,
onCancel: () {
activeChatCubit.setActiveChat(null);
},
onClose: () {
activeChatCubit.setActiveChat(null);
},
key: ValueKey(activeChatLocalConversationKey));
}