fix BuildContext crash when starting new chat
This commit is contained in:
parent
5d1cc149ef
commit
3cb3ded264
|
|
@ -168,13 +168,13 @@ class UserDialog extends StatelessWidget {
|
||||||
bigButtons: true,
|
bigButtons: true,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final router = GoRouter.of(context);
|
final router = GoRouter.of(context);
|
||||||
Navigator.of(context).pop();
|
|
||||||
final roomIdResult = await showFutureLoadingDialog(
|
final roomIdResult = await showFutureLoadingDialog(
|
||||||
context: context,
|
context: context,
|
||||||
future: () => client.startDirectChat(profile.userId),
|
future: () => client.startDirectChat(profile.userId),
|
||||||
);
|
);
|
||||||
final roomId = roomIdResult.result;
|
final roomId = roomIdResult.result;
|
||||||
if (roomId == null) return;
|
if (roomId == null) return;
|
||||||
|
if (context.mounted) Navigator.of(context).pop();
|
||||||
router.go('/rooms/$roomId');
|
router.go('/rooms/$roomId');
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ name: extera_next
|
||||||
description: Chat with your friends.
|
description: Chat with your friends.
|
||||||
publish_to: none
|
publish_to: none
|
||||||
# On version bump also increase the build number for F-Droid
|
# On version bump also increase the build number for F-Droid
|
||||||
version: 1.0.0
|
version: 2.0.0
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.0.0 <4.0.0"
|
sdk: ">=3.0.0 <4.0.0"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue