Browse Source

Torrent: If dateDone==null but partDone==1, set it to 1900-12-31

so they appear at the bottom of the list when sorting by date done
descending
pull/11/head
Tom Briden 11 years ago
parent
commit
c1443b8e99
  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