X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fui%2Fstdin%2FListDownloadsCommand.java;h=ede0024a6ade9481aa96b2b5d1017be6785a0667;hb=69d9f0cd50fe26dd878be3d21facd3199c72f445;hp=c352cdf805796f966831db1fffcce98ecfaad533;hpb=6df7a0723832a5191296016ecd4c5b64ea881902;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/ui/stdin/ListDownloadsCommand.java b/src/main/java/net/pterodactylus/xdcc/ui/stdin/ListDownloadsCommand.java index c352cdf..ede0024 100644 --- a/src/main/java/net/pterodactylus/xdcc/ui/stdin/ListDownloadsCommand.java +++ b/src/main/java/net/pterodactylus/xdcc/ui/stdin/ListDownloadsCommand.java @@ -77,7 +77,7 @@ public class ListDownloadsCommand implements Command { @Override public State execute(State state, List parameters, Writer outputWriter) throws IOException { int counter = 0; - List downloads = newArrayList(from(core.downloads()).toSortedList(Ordering.from(BY_NAME).compound(BY_RUNNING))); + List downloads = newArrayList(from(core.downloads()).toSortedList(Ordering.from(BY_RUNNING).compound(BY_NAME))); for (Download download : downloads) { DccReceiver dccReceiver = download.dccReceiver(); if (dccReceiver == null) { @@ -98,7 +98,6 @@ public class ListDownloadsCommand implements Command { outputWriter.write(")\n"); } outputWriter.write("End of DCCs.\n"); - outputWriter.flush(); return state.setLastDownloads(downloads); }