mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
fix: file transfer, web (#12565)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -30,15 +30,17 @@ enum SortBy {
|
|||||||
class JobID {
|
class JobID {
|
||||||
int _count = 0;
|
int _count = 0;
|
||||||
int next() {
|
int next() {
|
||||||
String v = bind.mainGetCommonSync(key: 'transfer-job-id');
|
|
||||||
try {
|
try {
|
||||||
return int.parse(v);
|
if (!isWeb) {
|
||||||
|
String v = bind.mainGetCommonSync(key: 'transfer-job-id');
|
||||||
|
return int.parse(v);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// unreachable. But we still handle it to make it safe.
|
debugPrint("Failed to get transfer job id: $e");
|
||||||
// If we return -1, we have to check it in the caller.
|
|
||||||
_count++;
|
|
||||||
return _count;
|
|
||||||
}
|
}
|
||||||
|
// Finally increase the count if on the web or if failed to get the id.
|
||||||
|
_count++;
|
||||||
|
return _count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user