Enable change id only when connected

This commit is contained in:
rustdesk
2023-06-26 22:05:27 +08:00
parent fe1d8b7c83
commit 0d658963e4
3 changed files with 7 additions and 2 deletions

View File

@@ -519,7 +519,9 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin {
}
Widget changeId() {
return _Button('Change ID', changeIdDialog, enabled: !locked);
final serverModel = Provider.of<ServerModel>(context);
return _Button('Change ID', changeIdDialog,
enabled: !locked && serverModel.connectStatus > 0);
}
Widget permissions(context) {