mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Changed the root package from net.sf.briar to org.briarproject.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package org.briarproject.android;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import org.briarproject.api.db.MessageHeader;
|
||||
|
||||
public class AscendingHeaderComparator implements Comparator<MessageHeader> {
|
||||
|
||||
public static final AscendingHeaderComparator INSTANCE =
|
||||
new AscendingHeaderComparator();
|
||||
|
||||
public int compare(MessageHeader a, MessageHeader b) {
|
||||
// The oldest message comes first
|
||||
long aTime = a.getTimestamp(), bTime = b.getTimestamp();
|
||||
if(aTime < bTime) return -1;
|
||||
if(aTime > bTime) return 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user