fix file send stupid bug

This commit is contained in:
csf 2022-04-07 22:58:47 +08:00
parent 81a2a58c2f
commit f55ae81580
2 changed files with 7 additions and 3 deletions

View File

@ -70,6 +70,9 @@ class FileModel extends ChangeNotifier {
final _jobResultListener = JobResultListener<Map<String, dynamic>>();
toggleSelectMode() {
if (jobState == JobState.inProgress) {
return;
}
_selectMode = !_selectMode;
notifyListeners();
}
@ -416,6 +419,7 @@ class FileModel extends ChangeNotifier {
cancelJob(int id) {
FFI.setByName("cancel_job", id.toString());
jobReset();
}
changeSortStyle(SortBy sort) {

View File

@ -427,7 +427,7 @@ class _FileManagerPageState extends State<FileManagerPage> {
title: translate("Waiting"),
text:
"${translate("Speed")}: ${readableFileSize(model.jobProgress.speed)}/s",
onCanceled: model.cancelJob(model.jobProgress.id),
onCanceled: () => model.cancelJob(model.jobProgress.id),
);
case JobState.done:
return BottomSheetBody(