[mob][cast] Fix cast progress state
This commit is contained in:
parent
1d1ee1248c
commit
d779fc05bd
2 changed files with 6 additions and 6 deletions
|
@ -79,12 +79,6 @@ class _AutoCastDialogState extends State<AutoCastDialog> {
|
|||
});
|
||||
try {
|
||||
await _connectToYourApp(context, device);
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_isDeviceTapInProgress.remove(device);
|
||||
});
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
} catch (e) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
@ -128,6 +122,11 @@ class _AutoCastDialogState extends State<AutoCastDialog> {
|
|||
final code = message[CastMessageType.pairCode]!['code'];
|
||||
widget.onConnect(code);
|
||||
}
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_isDeviceTapInProgress.remove(castDevice);
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -758,6 +758,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
|
|||
return AutoCastDialog(
|
||||
(device) async {
|
||||
await _castPair(bContext, gw, device);
|
||||
Navigator.pop(bContext);
|
||||
},
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue