mirror of
https://github.com/ente-io/ente.git
synced 2025-08-12 09:10:25 +00:00
[mob] Disable auto-cast for iOS (#1633)
## Description ## Tests Tested on sim
This commit is contained in:
commit
a39e6b54cc
@ -108,7 +108,7 @@
|
|||||||
<key>NSBonjourServices</key>
|
<key>NSBonjourServices</key>
|
||||||
<array>
|
<array>
|
||||||
<string>_googlecast._tcp</string>
|
<string>_googlecast._tcp</string>
|
||||||
<string>F5BCEC64._googlecast._tcp</string>
|
<string>_F5BCEC64._googlecast._tcp</string>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<key>NSLocalNetworkUsageDescription</key>
|
<key>NSLocalNetworkUsageDescription</key>
|
||||||
|
@ -738,34 +738,38 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
|
|||||||
|
|
||||||
// stop any existing cast session
|
// stop any existing cast session
|
||||||
gw.revokeAllTokens().ignore();
|
gw.revokeAllTokens().ignore();
|
||||||
final result = await showDialog<ButtonAction?>(
|
if (!Platform.isAndroid) {
|
||||||
context: context,
|
await _pairWithPin(gw, '');
|
||||||
barrierDismissible: true,
|
} else {
|
||||||
builder: (BuildContext context) {
|
final result = await showDialog<ButtonAction?>(
|
||||||
return const CastChooseDialog();
|
|
||||||
},
|
|
||||||
);
|
|
||||||
if (result == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// wait to allow the dialog to close
|
|
||||||
await Future.delayed(const Duration(milliseconds: 100));
|
|
||||||
if (result == ButtonAction.first) {
|
|
||||||
await showDialog(
|
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: true,
|
barrierDismissible: true,
|
||||||
builder: (BuildContext bContext) {
|
builder: (BuildContext context) {
|
||||||
return AutoCastDialog(
|
return const CastChooseDialog();
|
||||||
(device) async {
|
|
||||||
await _castPair(bContext, gw, device);
|
|
||||||
Navigator.pop(bContext);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
if (result == null) {
|
||||||
if (result == ButtonAction.second) {
|
return;
|
||||||
await _pairWithPin(gw, '');
|
}
|
||||||
|
// wait to allow the dialog to close
|
||||||
|
await Future.delayed(const Duration(milliseconds: 100));
|
||||||
|
if (result == ButtonAction.first) {
|
||||||
|
await showDialog(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: true,
|
||||||
|
builder: (BuildContext bContext) {
|
||||||
|
return AutoCastDialog(
|
||||||
|
(device) async {
|
||||||
|
await _castPair(bContext, gw, device);
|
||||||
|
Navigator.pop(bContext);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (result == ButtonAction.second) {
|
||||||
|
await _pairWithPin(gw, '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user