fixed a bugg where events didnt order properly
This commit is contained in:
parent
fefc7492e8
commit
7496952a32
@ -154,7 +154,17 @@ public abstract class Event extends LazyDeletableDomainObject
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(Event other) {
|
public int compareTo(Event other) {
|
||||||
return (int) (dueDate.getTime() - other.dueDate.getTime());
|
int dcomp = dueDate.compareTo(other.dueDate);
|
||||||
|
if (dcomp == 0){
|
||||||
|
if (id == null){
|
||||||
|
return -1;
|
||||||
|
}else if(other.id == null){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else return id.compareTo(other.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dcomp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Panel getDisplayPanel(String id){
|
public Panel getDisplayPanel(String id){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user