mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-24 12:29:11 +00:00
Update last seen state on desktop sync send
// FREEBIE
This commit is contained in:
@@ -264,10 +264,14 @@ public class ThreadDatabase extends Database {
|
||||
notifyConversationListListeners();
|
||||
}
|
||||
|
||||
public List<MarkedMessageInfo> setRead(long threadId) {
|
||||
public List<MarkedMessageInfo> setRead(long threadId, boolean lastSeen) {
|
||||
ContentValues contentValues = new ContentValues(1);
|
||||
contentValues.put(READ, 1);
|
||||
|
||||
if (lastSeen) {
|
||||
contentValues.put(LAST_SEEN, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
SQLiteDatabase db = databaseHelper.getWritableDatabase();
|
||||
db.update(TABLE_NAME, contentValues, ID_WHERE, new String[] {threadId+""});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user