mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
file cancel job; update android
This commit is contained in:
@@ -328,6 +328,7 @@ class FileModel extends ChangeNotifier {
|
||||
} catch (e) {}
|
||||
}
|
||||
});
|
||||
_selectMode = false;
|
||||
refresh();
|
||||
}
|
||||
|
||||
@@ -407,7 +408,9 @@ class FileModel extends ChangeNotifier {
|
||||
FFI.setByName("create_dir", jsonEncode(msg));
|
||||
}
|
||||
|
||||
cancelJob(int id) {}
|
||||
cancelJob(int id) {
|
||||
FFI.setByName("cancel_job",id.toString());
|
||||
}
|
||||
|
||||
changeSortStyle(SortBy sort) {
|
||||
_sortStyle = sort;
|
||||
|
||||
@@ -261,11 +261,14 @@ class ServerModel with ChangeNotifier {
|
||||
void onClientRemove(Map<String, dynamic> evt) {
|
||||
try {
|
||||
final id = int.parse(evt['id'] as String);
|
||||
_clients.remove(id);
|
||||
if(_clients.containsKey(id)){
|
||||
_clients.remove(id);
|
||||
}else{
|
||||
// reset the login dialog, to-do,it will close any showing dialog
|
||||
DialogManager.reset();
|
||||
}
|
||||
notifyListeners();
|
||||
} catch (e) {
|
||||
// singleWhere fail ,reset the login dialog
|
||||
DialogManager.reset();
|
||||
debugPrint("onClientRemove failed,error:$e");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,15 +333,6 @@ class _FileManagerPageState extends State<FileManagerPage> {
|
||||
],
|
||||
));
|
||||
|
||||
Widget emptyPage() {
|
||||
return Column(
|
||||
children: [
|
||||
headTools(),
|
||||
Expanded(child: Center(child: Text("Empty Directory")))
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget listTail() {
|
||||
return Container(
|
||||
height: 100,
|
||||
@@ -411,7 +402,7 @@ class _FileManagerPageState extends State<FileManagerPage> {
|
||||
title: translate("Waiting"),
|
||||
text:
|
||||
"${translate("Speed")}: ${readableFileSize(model.jobProgress.speed)}/s",
|
||||
onCanceled: null,
|
||||
onCanceled: model.cancelJob(model.jobProgress.id),
|
||||
);
|
||||
case JobState.done:
|
||||
return BottomSheetBody(
|
||||
|
||||
Reference in New Issue
Block a user