diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java b/app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java index bd7928fd..a2b6d4ed 100644 --- a/app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java +++ b/app/src/main/java/github/daneren2005/dsub/domain/MusicDirectory.java @@ -715,15 +715,14 @@ public class MusicDirectory implements Serializable { Integer lhsTrack = lhs.getTrack(); Integer rhsTrack = rhs.getTrack(); - if(lhsTrack != null && rhsTrack != null && lhsTrack != rhsTrack) { + if(lhsTrack == rhsTrack) { + return collator.compare(lhs.getTitle(), rhs.getTitle()); + } else if(lhsTrack != null && rhsTrack != null) { return lhsTrack.compareTo(rhsTrack); } else if(lhsTrack != null) { return -1; - } else if(rhsTrack != null) { - return 1; } - - return collator.compare(lhs.getTitle(), rhs.getTitle()); + return 1; } public static void sort(List<Entry> entries) { |