diff --git a/lib/pages/user_bottom_sheet/user_bottom_sheet.dart b/lib/pages/user_bottom_sheet/user_bottom_sheet.dart index c4976b03..f19be8de 100644 --- a/lib/pages/user_bottom_sheet/user_bottom_sheet.dart +++ b/lib/pages/user_bottom_sheet/user_bottom_sheet.dart @@ -86,10 +86,7 @@ class UserBottomSheetController extends State { case 'message': final roomIdResult = await showFutureLoadingDialog( context: context, - future: () async { - final roomId = await widget.user.startDirectChat(); - return roomId; - }, + future: () => widget.user.startDirectChat(), ); if (roomIdResult.error != null) return; VRouter.of(widget.outerContext) diff --git a/lib/widgets/profile_bottom_sheet.dart b/lib/widgets/profile_bottom_sheet.dart index 03a3186a..8b581a4b 100644 --- a/lib/widgets/profile_bottom_sheet.dart +++ b/lib/widgets/profile_bottom_sheet.dart @@ -25,10 +25,7 @@ class ProfileBottomSheet extends StatelessWidget { final client = Matrix.of(context).client; final result = await showFutureLoadingDialog( context: context, - future: () async { - final roomId = await client.startDirectChat(userId); - return roomId; - }, + future: () => client.startDirectChat(userId), ); if (result.error == null) { VRouter.of(context).toSegments(['rooms', result.result]);