fix: Display loading dialog on start DM

This commit is contained in:
Christian Pauly 2021-08-12 12:15:43 +02:00
parent d9bc1de6c7
commit 51d9a56058

View File

@ -83,8 +83,12 @@ class UserBottomSheetController extends State<UserBottomSheet> {
}
break;
case 'message':
final roomId = await widget.user.startDirectChat();
VRouter.of(widget.outerContext).to('/rooms/$roomId');
final roomIdResult = await showFutureLoadingDialog(
context: context,
future: () => widget.user.startDirectChat(),
);
if (roomIdResult.error != null) return;
VRouter.of(widget.outerContext).to('/rooms/${roomIdResult.result}');
Navigator.of(context, rootNavigator: false).pop();
break;
}