fix reconnect logic

This commit is contained in:
Hiroshi Horie
2021-12-23 01:50:58 +07:00
parent a0c7744baa
commit 94b4b07e92
9 changed files with 157 additions and 113 deletions
+8 -1
View File
@@ -126,7 +126,14 @@ class _ControlsWidgetState extends State<ControlsWidget> {
void _onTapReconnect() async {
final result = await context.showReconnectDialog();
if (result == true) await widget.room.reconnect();
if (result == true) {
try {
await widget.room.reconnect();
await context.showReconnectSuccessDialog();
} catch (error) {
await context.showErrorDialog(error);
}
}
}
void _onTapSendData() async {