diff --git a/app/src/main/java/ch/nuth/zhaw/exbox/Competitor.java b/app/src/main/java/ch/nuth/zhaw/exbox/Competitor.java index 84b79f7..852734b 100644 --- a/app/src/main/java/ch/nuth/zhaw/exbox/Competitor.java +++ b/app/src/main/java/ch/nuth/zhaw/exbox/Competitor.java @@ -48,7 +48,17 @@ public class Competitor implements Comparable { @Override public int compareTo(Competitor o) { - return Long.compare(parseTime(getTime()), parseTime(o.getTime())); + int result = rank - o.rank; + + if (result == 0) { + result = Long.compare(parseTime(getTime()), parseTime(o.getTime())); + + if (result == 0) { + result = getName().compareTo(o.getName()); + } + } + + return result; } @Override