1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-17 15:05:03 -05:00
k-9/src/com/fsck/k9/controller/MessageDateComparator.java
Jesse Vincent 12d1097a24 Big, scary massive "ant astyle" to get us back to something
approximating AOSP coding standards.
2011-02-06 17:09:48 -05:00

21 lines
536 B
Java

package com.fsck.k9.controller;
import java.util.Comparator;
import com.fsck.k9.mail.Message;
public class MessageDateComparator implements Comparator<Message> {
public int compare(Message o1, Message o2) {
try {
if (o1.getSentDate() == null) {
return 1;
} else if (o2.getSentDate() == null) {
return -1;
} else
return o2.getSentDate().compareTo(o1.getSentDate());
} catch (Exception e) {
return 0;
}
}
}