mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 09:58:54 +00:00
Change TS Media message timestamp from received time to sent time
Fix #3525 Closes #3535 //FREEBIE
This commit is contained in:
committed by
Moxie Marlinspike
parent
038f24f394
commit
fe5e101463
@@ -482,13 +482,8 @@ public class ThreadDatabase extends Database {
|
||||
MessageRecord record;
|
||||
|
||||
if (reader != null && (record = reader.getNext()) != null) {
|
||||
final long timestamp;
|
||||
|
||||
if (record.isPush()) timestamp = record.getDateSent();
|
||||
else timestamp = record.getDateReceived();
|
||||
|
||||
updateThread(threadId, count, record.getBody().getBody(), getAttachmentUriFor(record),
|
||||
timestamp, record.getDeliveryStatus(), record.getReceiptCount(),
|
||||
record.getTimestamp(), record.getDeliveryStatus(), record.getReceiptCount(),
|
||||
record.getType(), unarchive);
|
||||
notifyConversationListListeners();
|
||||
return false;
|
||||
|
||||
@@ -115,6 +115,11 @@ public abstract class MessageRecord extends DisplayRecord {
|
||||
return SmsDatabase.Types.isPushType(type) && !SmsDatabase.Types.isForcedSms(type);
|
||||
}
|
||||
|
||||
public long getTimestamp() {
|
||||
if (isPush()) return getDateSent();
|
||||
else return getDateReceived();
|
||||
}
|
||||
|
||||
public boolean isForcedSms() {
|
||||
return SmsDatabase.Types.isForcedSms(type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user