safer navigator.pop

This commit is contained in:
rustdesk 2022-01-29 15:55:00 +08:00
parent b24c997a20
commit eebb7e1f4c
6 changed files with 5 additions and 11 deletions

View File

@ -32,6 +32,7 @@ void Function() loadingCancelCallback;
void showLoading(String text, BuildContext context) {
if (_hasDialog && context != null) {
Navigator.pop(context);
_hasDialog = false;
}
dismissLoading();
if (isAndroid) {
@ -122,6 +123,7 @@ void msgbox(String type, String title, String text, BuildContext context,
dismissLoading();
if (_hasDialog) {
Navigator.pop(context);
_hasDialog = false;
}
final buttons = [
Expanded(child: Container()),

View File

@ -6,11 +6,7 @@ class PlatformFFI {
static void clearRgbaFrame() {}
static Uint8List getRgba() {
var data = js.context.callMethod('getRgba');
if (data != null) {
return Uint8List.sublistView(data);
}
return null;
return js.context.callMethod('getRgba');
}
static Future<String> getVersion() async {

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -32,9 +32,8 @@
<title>RustDesk</title>
<link rel="manifest" href="manifest.json">
<script src="ogvjs/ogv.js"></script>
<script src="./LibYUV.js"></script>
<script type="module" crossorigin src="/assets/index.a4c96927.js"></script>
<link rel="modulepreload" href="/assets/vendor.fd8ceed9.js">
<script type="module" crossorigin src="/assets/index.9eb7e514.js"></script>
<link rel="modulepreload" href="/assets/vendor.981241b3.js">
</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to

BIN
web/yuv.wasm Executable file

Binary file not shown.