refactor per code review

This commit is contained in:
rustdesk
2026-04-22 01:41:13 +08:00
parent 5fd20f808c
commit b239535009

View File

@@ -1539,12 +1539,12 @@ class RustdeskImpl {
Future<void> mainAccountAuth(
{required String op, required bool rememberMe, dynamic hint}) {
// Safari only allows auth popups while handling the original user gesture.
// Call into JS synchronously so the web OIDC flow can pre-open the window.
js.context.callMethod('setByName', [
// Use Future.sync so the JS call runs synchronously (pre-opening the OIDC
// window) while any interop error still surfaces as a Future error.
return Future.sync(() => js.context.callMethod('setByName', [
'account_auth',
jsonEncode({'op': op, 'remember': rememberMe})
]);
return Future.value();
]));
}
Future<void> mainAccountAuthCancel({dynamic hint}) {