Browse Source

Merge pull request #11 from tombriden/datedone_sortfix

Fix for datedone sorting if there is no date done for a torrent.
pull/13/head
Eric Kok 11 years ago
parent
commit
d0b0ab1c32
  1. BIN
      core/libs/transdroid-connect.jar
  2. 7
      lib/src/org/transdroid/daemon/Torrent.java

BIN
core/libs/transdroid-connect.jar

Binary file not shown.

7
lib/src/org/transdroid/daemon/Torrent.java

@ -142,7 +142,12 @@ public final class Torrent implements Parcelable, Comparable<Torrent> {
if (realDateDone != null) { if (realDateDone != null) {
this.dateDone = realDateDone; this.dateDone = realDateDone;
} else { } else {
if (eta == -1 || eta == -2) { if( this.partDone == 1){ //finished but no finished date set so move to bottom of list
Calendar cal = Calendar.getInstance();
cal.clear();
cal.set(1900, 12, 31);
this.dateDone = cal.getTime();
} else if (eta == -1 || eta == -2) {
this.dateDone = new Date(Long.MAX_VALUE); this.dateDone = new Date(Long.MAX_VALUE);
} else { } else {
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();

Loading…
Cancel
Save