File Manager. Show filename instead of path in tranfer list

This commit is contained in:
grummbeer 2023-03-03 20:26:13 +01:00
parent 239d0291d0
commit dd4c80a779
2 changed files with 6 additions and 1 deletions

View File

@ -644,7 +644,7 @@ class _FileManagerPageState extends State<FileManagerPage>
Duration(milliseconds: 500),
message: item.jobName,
child: Text(
item.jobName,
item.fileName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
).paddingSymmetric(vertical: 10),

View File

@ -500,6 +500,7 @@ class FileModel extends ChangeNotifier {
for (var from in items.items) {
final jobId = ++_jobId;
_jobTable.add(JobProgress()
..fileName = path.basename(from.path)
..jobName = from.path
..totalSize = from.size
..state = JobState.inProgress
@ -853,7 +854,9 @@ class FileModel extends ChangeNotifier {
int fileNum = jobDetail['file_num'];
bool isRemote = jobDetail['is_remote'];
final currJobId = _jobId++;
String fileName = path.basename(isRemote ? remote : to);
var jobProgress = JobProgress()
..fileName = fileName
..jobName = isRemote ? remote : to
..id = currJobId
..isRemote = isRemote
@ -1121,6 +1124,7 @@ class JobProgress {
var fileCount = 0;
var isRemote = false;
var jobName = "";
var fileName = "";
var remote = "";
var to = "";
var showHidden = false;
@ -1133,6 +1137,7 @@ class JobProgress {
speed = 0;
finishedSize = 0;
jobName = "";
fileName = "";
fileCount = 0;
remote = "";
to = "";