mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 18:33:39 +00:00
parent
741066a10e
commit
25daf01307
@ -289,7 +289,7 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
|
||||
Cursor cursor = getCursorAtPositionOrThrow(i);
|
||||
MessageRecord messageRecord = getMessageRecord(cursor);
|
||||
|
||||
if (messageRecord.getTimestamp() < lastSeen) {
|
||||
if (messageRecord.getDateReceived() <= lastSeen) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@ -335,7 +335,7 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
|
||||
return Util.hashCode(calendar.get(Calendar.YEAR), calendar.get(Calendar.DAY_OF_YEAR));
|
||||
}
|
||||
|
||||
public long getTimestamp(int position) {
|
||||
public long getReceivedTimestamp(int position) {
|
||||
if (!isActiveCursor()) return 0;
|
||||
if (isHeaderPosition(position)) return 0;
|
||||
if (isFooterPosition(position)) return 0;
|
||||
@ -345,7 +345,7 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
|
||||
Cursor cursor = getCursorAtPositionOrThrow(position);
|
||||
MessageRecord messageRecord = getMessageRecord(cursor);
|
||||
|
||||
return messageRecord.getTimestamp();
|
||||
return messageRecord.getDateReceived();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -388,8 +388,8 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
|
||||
return false;
|
||||
}
|
||||
|
||||
long currentRecordTimestamp = adapter.getTimestamp(position);
|
||||
long previousRecordTimestamp = adapter.getTimestamp(position + 1);
|
||||
long currentRecordTimestamp = adapter.getReceivedTimestamp(position);
|
||||
long previousRecordTimestamp = adapter.getReceivedTimestamp(position + 1);
|
||||
|
||||
return currentRecordTimestamp > lastSeenTimestamp && previousRecordTimestamp < lastSeenTimestamp;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user