mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
refactor service start/stop
This commit is contained in:
@@ -274,12 +274,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
offstage: !svcStopped.value,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
bool checked = !bind.mainIsInstalled() ||
|
||||
await bind.mainCheckSuperUserPermission();
|
||||
if (checked) {
|
||||
bind.mainSetOption(key: "stop-service", value: "");
|
||||
bind.mainSetOption(key: "access-mode", value: "");
|
||||
}
|
||||
await start_service(true);
|
||||
},
|
||||
child: Text(translate("Start Service"),
|
||||
style: TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user