Changeset 9b9f96d


Ignore:
Timestamp:
Jul 28, 2018 7:34:16 PM (21 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f12dbba
Parents:
b8437cd
Message:

i2psnark: Tweak 1st column sort order

Location:
apps/i2psnark/java/src/org/klomp/snark/web
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java

    rb8437cd r9b9f96d  
    480480        boolean showSort = total > 1;
    481481        out.write("<tr><th class=\"snarkGraphicStatus\">");
    482         String sort = ("2".equals(currentSort)) ? "-2" : "2";
     482        String sort = ("-2".equals(currentSort)) ? "2" : "-2";
    483483        if (showSort) {
    484484            out.write("<a href=\"" + _contextPath + '/' + getQueryString(req, null, null, sort));
  • apps/i2psnark/java/src/org/klomp/snark/web/Sorters.java

    rb8437cd r9b9f96d  
    129129
    130130        private final Pattern _p;
     131        private static final Collator _c = Collator.getInstance();
    131132
    132133        /** @param lang may be null */
     
    156157                    rs = rs.substring(m.group(1).length());
    157158            }
    158             return Collator.getInstance().compare(ls, rs);
     159            return _c.compare(ls, rs);
    159160        }
    160161    }
     
    208209            if (snark.isStopped()) {
    209210                if (remaining < 0)
    210                     return 0;
     211                    return 10;
    211212                if (remaining > 0)
    212213                    return 5;
    213                 return 10;
     214                return 0;
    214215            }
    215216            if (snark.isStarting())
Note: See TracChangeset for help on using the changeset viewer.