mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-05-09 15:48:09 +03:00
refactor per code review
This commit is contained in:
@@ -1539,12 +1539,12 @@ class RustdeskImpl {
|
|||||||
Future<void> mainAccountAuth(
|
Future<void> mainAccountAuth(
|
||||||
{required String op, required bool rememberMe, dynamic hint}) {
|
{required String op, required bool rememberMe, dynamic hint}) {
|
||||||
// Safari only allows auth popups while handling the original user gesture.
|
// 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.
|
// Use Future.sync so the JS call runs synchronously (pre-opening the OIDC
|
||||||
js.context.callMethod('setByName', [
|
// window) while any interop error still surfaces as a Future error.
|
||||||
|
return Future.sync(() => js.context.callMethod('setByName', [
|
||||||
'account_auth',
|
'account_auth',
|
||||||
jsonEncode({'op': op, 'remember': rememberMe})
|
jsonEncode({'op': op, 'remember': rememberMe})
|
||||||
]);
|
]));
|
||||||
return Future.value();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> mainAccountAuthCancel({dynamic hint}) {
|
Future<void> mainAccountAuthCancel({dynamic hint}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user