Update last seen state on desktop sync send

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-02-22 15:05:35 -08:00
parent 2395b79bfc
commit 8cd50d1e82
9 changed files with 13 additions and 14 deletions

View File

@@ -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+""});