mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-11 18:47:47 +00:00
Refact. Qs, do not check qs on startup. (#7272)
Process will not exit if early return on the flutter side. core_main.rs has checked qs already. Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -109,7 +109,7 @@ class PlatformFFI {
|
||||
sessionId: sessionId, display: display, ptr: ptr);
|
||||
|
||||
/// Init the FFI class, loads the native Rust core library.
|
||||
Future<bool> init(String appType) async {
|
||||
Future<void> init(String appType) async {
|
||||
_appType = appType;
|
||||
final dylib = Platform.isAndroid
|
||||
? DynamicLibrary.open('librustdesk.so')
|
||||
@@ -130,9 +130,6 @@ class PlatformFFI {
|
||||
debugPrint('Failed to get documents directory: $e');
|
||||
}
|
||||
_ffiBind = RustdeskImpl(dylib);
|
||||
if (_ffiBind.isQs() && (_appType != kAppTypeMain && _appType != kAppTypeConnectionManager)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Platform.isLinux) {
|
||||
// Start a dbus service, no need to await
|
||||
@@ -206,7 +203,6 @@ class PlatformFFI {
|
||||
debugPrintStack(label: 'initialize failed: $e');
|
||||
}
|
||||
version = await getVersion();
|
||||
return true;
|
||||
}
|
||||
|
||||
Future<bool> tryHandle(Map<String, dynamic> evt) async {
|
||||
|
||||
Reference in New Issue
Block a user