mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-04 20:21:35 +08:00
Merge pull request #3772 from Kingtous/master
fix: shortcut not working due to range error
This commit is contained in:
commit
ab4c6e24f0
@ -1522,14 +1522,14 @@ bool checkArguments() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String? id =
|
String? id =
|
||||||
kBootArgs.length < connectIndex + 1 ? null : kBootArgs[connectIndex + 1];
|
kBootArgs.length <= connectIndex + 1 ? null : kBootArgs[connectIndex + 1];
|
||||||
String? password =
|
String? password =
|
||||||
kBootArgs.length < connectIndex + 2 ? null : kBootArgs[connectIndex + 2];
|
kBootArgs.length <= connectIndex + 2 ? null : kBootArgs[connectIndex + 2];
|
||||||
if (password != null && password.startsWith("--")) {
|
if (password != null && password.startsWith("--")) {
|
||||||
password = null;
|
password = null;
|
||||||
}
|
}
|
||||||
final switchUuidIndex = kBootArgs.indexOf("--switch_uuid");
|
final switchUuidIndex = kBootArgs.indexOf("--switch_uuid");
|
||||||
String? switchUuid = kBootArgs.length < switchUuidIndex + 1
|
String? switchUuid = kBootArgs.length <= switchUuidIndex + 1
|
||||||
? null
|
? null
|
||||||
: kBootArgs[switchUuidIndex + 1];
|
: kBootArgs[switchUuidIndex + 1];
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
|
@ -134,10 +134,9 @@ void runMainApp(bool startService) async {
|
|||||||
await restoreWindowPosition(WindowType.Main);
|
await restoreWindowPosition(WindowType.Main);
|
||||||
// Check the startup argument, if we successfully handle the argument, we keep the main window hidden.
|
// Check the startup argument, if we successfully handle the argument, we keep the main window hidden.
|
||||||
final handledByUniLinks = await initUniLinks();
|
final handledByUniLinks = await initUniLinks();
|
||||||
final handledByCli = checkArguments();
|
|
||||||
debugPrint(
|
debugPrint(
|
||||||
"handled by uni links: $handledByUniLinks, handled by cli: $handledByCli");
|
"handled by uni links: $handledByUniLinks");
|
||||||
if (handledByUniLinks || handledByCli) {
|
if (handledByUniLinks || checkArguments()) {
|
||||||
windowManager.hide();
|
windowManager.hide();
|
||||||
} else {
|
} else {
|
||||||
windowManager.show();
|
windowManager.show();
|
||||||
|
Loading…
Reference in New Issue
Block a user