mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
feat: implement dialog callback
This commit is contained in:
@@ -289,7 +289,7 @@ class ServerModel with ChangeNotifier {
|
||||
toggleService() async {
|
||||
if (_isStart) {
|
||||
final res =
|
||||
await parent.target?.dialogManager.show<bool>((setState, close) {
|
||||
await parent.target?.dialogManager.show<bool>((setState, close, context) {
|
||||
submit() => close(true);
|
||||
return CustomAlertDialog(
|
||||
title: Row(children: [
|
||||
@@ -312,7 +312,7 @@ class ServerModel with ChangeNotifier {
|
||||
}
|
||||
} else {
|
||||
final res =
|
||||
await parent.target?.dialogManager.show<bool>((setState, close) {
|
||||
await parent.target?.dialogManager.show<bool>((setState, close, context) {
|
||||
submit() => close(true);
|
||||
return CustomAlertDialog(
|
||||
title: Row(children: [
|
||||
@@ -481,7 +481,7 @@ class ServerModel with ChangeNotifier {
|
||||
}
|
||||
|
||||
void showLoginDialog(Client client) {
|
||||
parent.target?.dialogManager.show((setState, close) {
|
||||
parent.target?.dialogManager.show((setState, close, context) {
|
||||
cancel() {
|
||||
sendLoginResponse(client, false);
|
||||
close();
|
||||
@@ -699,7 +699,7 @@ String getLoginDialogTag(int id) {
|
||||
}
|
||||
|
||||
showInputWarnAlert(FFI ffi) {
|
||||
ffi.dialogManager.show((setState, close) {
|
||||
ffi.dialogManager.show((setState, close, context) {
|
||||
submit() {
|
||||
AndroidPermissionManager.startAction(kActionAccessibilitySettings);
|
||||
close();
|
||||
@@ -726,7 +726,7 @@ showInputWarnAlert(FFI ffi) {
|
||||
}
|
||||
|
||||
Future<void> showClientsMayNotBeChangedAlert(FFI? ffi) async {
|
||||
await ffi?.dialogManager.show((setState, close) {
|
||||
await ffi?.dialogManager.show((setState, close, context) {
|
||||
return CustomAlertDialog(
|
||||
title: Text(translate("Permissions")),
|
||||
content: Column(
|
||||
|
||||
Reference in New Issue
Block a user