All dem changes

This commit is contained in:
ImBenji
2024-05-24 20:17:02 +01:00
parent 2846a061cc
commit ffde62a730
13 changed files with 990 additions and 195 deletions

View File

@@ -1671,11 +1671,33 @@ class _MultiModeJoinState extends State<MultiModeJoin> {
onPressed: () async {
LiveInformation liveInformation = LiveInformation();
liveInformation.setRouteVariant(null);
await liveInformation.joinRoom(controller.text);
Navigator.popAndPushNamed(context, "/multi/enroute");
if (controller.text.isNotEmpty ? await liveInformation.joinRoom(controller.text) : false) {
liveInformation.setRouteVariant(null);
Navigator.popAndPushNamed(context, "/multi/enroute");
} else {
showShadDialog(
context: context,
builder: (context) {
return ShadDialog(
title: const Text("Failed to join group"),
content: const Text("Failed to join group. Please check the room code and try again"),
actions: [
ShadButton(
text: const Text("Close"),
onPressed: () {
Navigator.pop(context);
},
)
],
);
}
);
}
},
)