mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 19:47:17 +00:00
refactor service start/stop
This commit is contained in:
@@ -2043,3 +2043,12 @@ void onCopyFingerprint(String value) {
|
||||
showToast(translate("no fingerprints"));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> start_service(bool is_start) async {
|
||||
bool checked = !bind.mainIsInstalled() ||
|
||||
!Platform.isMacOS ||
|
||||
await bind.mainCheckSuperUserPermission();
|
||||
if (checked) {
|
||||
bind.mainSetOption(key: "stop-service", value: is_start ? "" : "Y");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user