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 ""; return "";
} }
String name = files.get(0).path.replace(dir + "/", ""); String name = files.get(0).path.replace(dir + "/", "");
String substring = name.substring(0, 23); if (name.length() <= 20) {
if (name.length() > 25) { return String.format("%-20s", name);
substring = substring + "...";
} }
return substring; return name.substring(0, 17) + "...";
} }
public int getProgress() { public int getProgress() {