fix BuildContext crash when starting new chat

This commit is contained in:
OfficialDakari 2025-08-18 17:15:01 +05:00
parent 5d1cc149ef
commit 3cb3ded264
2 changed files with 2 additions and 2 deletions

View File

@ -168,13 +168,13 @@ class UserDialog extends StatelessWidget {
bigButtons: true,
onPressed: () async {
final router = GoRouter.of(context);
Navigator.of(context).pop();
final roomIdResult = await showFutureLoadingDialog(
context: context,
future: () => client.startDirectChat(profile.userId),
);
final roomId = roomIdResult.result;
if (roomId == null) return;
if (context.mounted) Navigator.of(context).pop();
router.go('/rooms/$roomId');
},
child: Text(

View File

@ -2,7 +2,7 @@ name: extera_next
description: Chat with your friends.
publish_to: none
# On version bump also increase the build number for F-Droid
version: 1.0.0
version: 2.0.0
environment:
sdk: ">=3.0.0 <4.0.0"