X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Frhynodge%2Ftriggers%2FNewTorrentTrigger.java;h=7b28fee851d9a16ba0487f1452b2e50fc8aedf39;hb=5a9b34156a69a0293235aaa764a3cf86cfb20f0f;hp=9e3e91ee22e1c563f1989394c01b9cace522d9bb;hpb=22e98b8896aa47b397ba89d887bfdbe212850517;p=rhynodge.git diff --git a/src/main/java/net/pterodactylus/rhynodge/triggers/NewTorrentTrigger.java b/src/main/java/net/pterodactylus/rhynodge/triggers/NewTorrentTrigger.java index 9e3e91e..7b28fee 100644 --- a/src/main/java/net/pterodactylus/rhynodge/triggers/NewTorrentTrigger.java +++ b/src/main/java/net/pterodactylus/rhynodge/triggers/NewTorrentTrigger.java @@ -33,6 +33,7 @@ import net.pterodactylus.rhynodge.states.TorrentState.TorrentFile; import org.apache.commons.lang3.StringEscapeUtils; import com.google.common.collect.Lists; +import com.google.common.collect.Ordering; import com.google.common.collect.Sets; /** @@ -54,7 +55,7 @@ public class NewTorrentTrigger implements Trigger { // /** - * {@inheritDocs} + * {@inheritDoc} */ @Override public State mergeStates(State previousState, State currentState) { @@ -146,7 +147,7 @@ public class NewTorrentTrigger implements Trigger { htmlBuilder.append("\n"); htmlBuilder.append("\n"); htmlBuilder.append("
\n"); - for (TorrentFile torrentFile : allTorrentFiles) { + for (TorrentFile torrentFile : sortNewFirst().sortedCopy(allTorrentFiles)) { if (newTorrentFiles.contains(torrentFile)) { htmlBuilder.append("