mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
fix issues
This commit is contained in:
parent
f80e7e169b
commit
3b84448d38
@ -426,7 +426,9 @@ public class ConversationAdapter <V extends View & BindableConversationItem>
|
|||||||
@Override
|
@Override
|
||||||
public void onBindHeaderViewHolder(HeaderViewHolder viewHolder, int position) {
|
public void onBindHeaderViewHolder(HeaderViewHolder viewHolder, int position) {
|
||||||
MessageRecord messageRecord = getRecordForPositionOrThrow(position);
|
MessageRecord messageRecord = getRecordForPositionOrThrow(position);
|
||||||
viewHolder.setText(DateUtils.getRelativeDate(getContext(), locale, messageRecord.getDateReceived()));
|
long timestamp = messageRecord.getDateReceived();
|
||||||
|
if (recipient.getAddress().isOpenGroup()) { timestamp = messageRecord.getTimestamp(); }
|
||||||
|
viewHolder.setText(DateUtils.getRelativeDate(getContext(), locale, timestamp));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBindLastSeenViewHolder(HeaderViewHolder viewHolder, int position) {
|
public void onBindLastSeenViewHolder(HeaderViewHolder viewHolder, int position) {
|
||||||
|
@ -844,7 +844,7 @@ public class MmsDatabase extends MessagingDatabase {
|
|||||||
// we use current time like a sortId of iOS as the receive time.
|
// we use current time like a sortId of iOS as the receive time.
|
||||||
// Since the messages has been sorted by server timestamp before they are processed,
|
// Since the messages has been sorted by server timestamp before they are processed,
|
||||||
// the order here by actual receiving time should be correct.
|
// the order here by actual receiving time should be correct.
|
||||||
long receiveTimestamp = System.currentTimeMillis();
|
long receiveTimestamp = serverTimestamp;
|
||||||
if (serverTimestamp == 0) { receiveTimestamp = retrieved.getSentTimeMillis(); }
|
if (serverTimestamp == 0) { receiveTimestamp = retrieved.getSentTimeMillis(); }
|
||||||
contentValues.put(DATE_RECEIVED, receiveTimestamp); // Loki - This is important due to how we handle GIFs
|
contentValues.put(DATE_RECEIVED, receiveTimestamp); // Loki - This is important due to how we handle GIFs
|
||||||
contentValues.put(PART_COUNT, retrieved.getAttachments().size());
|
contentValues.put(PART_COUNT, retrieved.getAttachments().size());
|
||||||
|
@ -629,7 +629,7 @@ public class SmsDatabase extends MessagingDatabase {
|
|||||||
// we use current time like a sortId of iOS as the receive time.
|
// we use current time like a sortId of iOS as the receive time.
|
||||||
// Since the messages has been sorted by server timestamp before they are processed,
|
// Since the messages has been sorted by server timestamp before they are processed,
|
||||||
// the order here by actual receiving time should be correct.
|
// the order here by actual receiving time should be correct.
|
||||||
long receiveTimestamp = System.currentTimeMillis();
|
long receiveTimestamp = serverTimestamp;
|
||||||
if (serverTimestamp == 0) { receiveTimestamp = message.getSentTimestampMillis(); }
|
if (serverTimestamp == 0) { receiveTimestamp = message.getSentTimestampMillis(); }
|
||||||
values.put(DATE_RECEIVED, receiveTimestamp); // Loki - This is important due to how we handle GIFs
|
values.put(DATE_RECEIVED, receiveTimestamp); // Loki - This is important due to how we handle GIFs
|
||||||
values.put(DATE_SENT, message.getSentTimestampMillis());
|
values.put(DATE_SENT, message.getSentTimestampMillis());
|
||||||
|
@ -139,6 +139,9 @@ public abstract class MessageRecord extends DisplayRecord {
|
|||||||
if (isPush() && getDateSent() < getDateReceived()) {
|
if (isPush() && getDateSent() < getDateReceived()) {
|
||||||
return getDateSent();
|
return getDateSent();
|
||||||
}
|
}
|
||||||
|
if (getRecipient().getAddress().isOpenGroup()) {
|
||||||
|
return getDateSent();
|
||||||
|
}
|
||||||
return getDateReceived();
|
return getDateReceived();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user