Skip to content

Commit 06b4e4f

Browse files
committed
fix(inbox): fixing pr comments
1 parent 85e8ddf commit 06b4e4f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

AndroidSDK/src/com/leanplum/LeanplumInbox.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,22 +307,21 @@ public List<String> messagesIds() {
307307
Collections.sort(messageIds, new Comparator<String>() {
308308
@Override
309309
public int compare(String firstMessageId, String secondMessageId) {
310-
LeanplumInboxMessage firstMessage = messageForId(firstMessageId);
311-
LeanplumInboxMessage secondMessage = messageForId(secondMessageId);
312310
// Message that is null will be moved to the back of the list.
311+
LeanplumInboxMessage firstMessage = messageForId(firstMessageId);
313312
if (firstMessage == null) {
314313
return -1;
315314
}
315+
LeanplumInboxMessage secondMessage = messageForId(secondMessageId);
316316
if (secondMessage == null) {
317317
return 1;
318318
}
319-
320-
Date firstDate = firstMessage.getDeliveryTimestamp();
321-
Date secondDate = secondMessage.getDeliveryTimestamp();
322319
// Message with null date will be moved to the back of the list.
320+
Date firstDate = firstMessage.getDeliveryTimestamp();
323321
if (firstDate == null) {
324322
return -1;
325323
}
324+
Date secondDate = secondMessage.getDeliveryTimestamp();
326325
if (secondDate == null) {
327326
return 1;
328327
}

0 commit comments

Comments
 (0)