fix get name

This commit is contained in:
NikoXu 2025-02-13 05:51:15 +00:00
parent 6e32270dc6
commit f02f21a6dd

View File

@ -40,11 +40,10 @@ public class Task implements Serializable {
return "";
}
String name = files.get(0).path.replace(dir + "/", "");
String substring = name.substring(0, 23);
if (name.length() > 25) {
substring = substring + "...";
if (name.length() <= 20) {
return String.format("%-20s", name);
}
return substring;
return name.substring(0, 17) + "...";
}
public int getProgress() {