fix file send stupid bug
This commit is contained in:
parent
81a2a58c2f
commit
f55ae81580
@ -70,6 +70,9 @@ class FileModel extends ChangeNotifier {
|
|||||||
final _jobResultListener = JobResultListener<Map<String, dynamic>>();
|
final _jobResultListener = JobResultListener<Map<String, dynamic>>();
|
||||||
|
|
||||||
toggleSelectMode() {
|
toggleSelectMode() {
|
||||||
|
if (jobState == JobState.inProgress) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
_selectMode = !_selectMode;
|
_selectMode = !_selectMode;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
@ -416,6 +419,7 @@ class FileModel extends ChangeNotifier {
|
|||||||
|
|
||||||
cancelJob(int id) {
|
cancelJob(int id) {
|
||||||
FFI.setByName("cancel_job", id.toString());
|
FFI.setByName("cancel_job", id.toString());
|
||||||
|
jobReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
changeSortStyle(SortBy sort) {
|
changeSortStyle(SortBy sort) {
|
||||||
@ -670,7 +674,7 @@ class PathUtil {
|
|||||||
return pathUtil.split(path);
|
return pathUtil.split(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static String dirname(String path, bool isWindows){
|
static String dirname(String path, bool isWindows) {
|
||||||
final pathUtil = isWindows ? windowsContext : posixContext;
|
final pathUtil = isWindows ? windowsContext : posixContext;
|
||||||
return pathUtil.dirname(path);
|
return pathUtil.dirname(path);
|
||||||
}
|
}
|
||||||
|
@ -359,7 +359,7 @@ class _FileManagerPageState extends State<FileManagerPage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.fromLTRB(30,5,30,0),
|
padding: EdgeInsets.fromLTRB(30, 5, 30, 0),
|
||||||
child: Text(
|
child: Text(
|
||||||
model.currentDir.path,
|
model.currentDir.path,
|
||||||
style: TextStyle(color: MyTheme.darkGray),
|
style: TextStyle(color: MyTheme.darkGray),
|
||||||
@ -427,7 +427,7 @@ class _FileManagerPageState extends State<FileManagerPage> {
|
|||||||
title: translate("Waiting"),
|
title: translate("Waiting"),
|
||||||
text:
|
text:
|
||||||
"${translate("Speed")}: ${readableFileSize(model.jobProgress.speed)}/s",
|
"${translate("Speed")}: ${readableFileSize(model.jobProgress.speed)}/s",
|
||||||
onCanceled: model.cancelJob(model.jobProgress.id),
|
onCanceled: () => model.cancelJob(model.jobProgress.id),
|
||||||
);
|
);
|
||||||
case JobState.done:
|
case JobState.done:
|
||||||
return BottomSheetBody(
|
return BottomSheetBody(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user