forked from I2P_Developers/i2p.i2p
i2psnark: Tweak 1st column sort order
This commit is contained in:
@ -479,7 +479,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
String currentSort = req.getParameter("sort");
|
||||
boolean showSort = total > 1;
|
||||
out.write("<tr><th class=\"snarkGraphicStatus\">");
|
||||
String sort = ("2".equals(currentSort)) ? "-2" : "2";
|
||||
String sort = ("-2".equals(currentSort)) ? "2" : "-2";
|
||||
if (showSort) {
|
||||
out.write("<a href=\"" + _contextPath + '/' + getQueryString(req, null, null, sort));
|
||||
out.write("\">");
|
||||
|
@ -128,6 +128,7 @@ class Sorters {
|
||||
private static class TorrentNameComparator implements Comparator<Snark>, Serializable {
|
||||
|
||||
private final Pattern _p;
|
||||
private static final Collator _c = Collator.getInstance();
|
||||
|
||||
/** @param lang may be null */
|
||||
private TorrentNameComparator(String lang) {
|
||||
@ -155,7 +156,7 @@ class Sorters {
|
||||
if (m.matches())
|
||||
rs = rs.substring(m.group(1).length());
|
||||
}
|
||||
return Collator.getInstance().compare(ls, rs);
|
||||
return _c.compare(ls, rs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,10 +208,10 @@ class Sorters {
|
||||
long remaining = snark.getRemainingLength();
|
||||
if (snark.isStopped()) {
|
||||
if (remaining < 0)
|
||||
return 0;
|
||||
return 10;
|
||||
if (remaining > 0)
|
||||
return 5;
|
||||
return 10;
|
||||
return 0;
|
||||
}
|
||||
if (snark.isStarting())
|
||||
return 15;
|
||||
|
Reference in New Issue
Block a user