mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 11:35:56 +00:00
feat: implement dialog callback
This commit is contained in:
@@ -20,7 +20,7 @@ void setPermanentPasswordDialog(OverlayDialogManager dialogManager) async {
|
||||
final p1 = TextEditingController(text: pw);
|
||||
var validateLength = false;
|
||||
var validateSame = false;
|
||||
dialogManager.show((setState, close) {
|
||||
dialogManager.show((setState, close, context) {
|
||||
submit() async {
|
||||
close();
|
||||
dialogManager.showLoading(translate("Waiting"));
|
||||
@@ -111,7 +111,7 @@ void setTemporaryPasswordLengthDialog(
|
||||
var index = lengths.indexOf(length);
|
||||
if (index < 0) index = 0;
|
||||
length = lengths[index];
|
||||
dialogManager.show((setState, close) {
|
||||
dialogManager.show((setState, close, context) {
|
||||
setLength(newValue) {
|
||||
final oldValue = length;
|
||||
if (oldValue == newValue) return;
|
||||
@@ -160,7 +160,7 @@ void showServerSettingsWithValue(
|
||||
String? relayServerMsg;
|
||||
String? apiServerMsg;
|
||||
|
||||
dialogManager.show((setState, close) {
|
||||
dialogManager.show((setState, close, context) {
|
||||
Future<bool> validate() async {
|
||||
if (idCtrl.text != oldCfg.idServer) {
|
||||
final res = await validateAsync(idCtrl.text);
|
||||
|
||||
Reference in New Issue
Block a user