mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 02:08:33 +00:00
Improve 'mark all read' performance.
This commit is contained in:
parent
cd3df4d3c1
commit
4ea861fe5c
@ -153,13 +153,15 @@ public abstract class MessagingDatabase extends Database implements MmsSmsColumn
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setAllReactionsSeen() {
|
public void setAllReactionsSeen() {
|
||||||
SQLiteDatabase db = databaseHelper.getWritableDatabase();
|
SQLiteDatabase db = databaseHelper.getWritableDatabase();
|
||||||
ContentValues values = new ContentValues();
|
ContentValues values = new ContentValues();
|
||||||
|
String query = REACTIONS_UNREAD + " != ?";
|
||||||
|
String[] args = new String[] { "0" };
|
||||||
|
|
||||||
values.put(REACTIONS_UNREAD, 0);
|
values.put(REACTIONS_UNREAD, 0);
|
||||||
values.put(REACTIONS_LAST_SEEN, System.currentTimeMillis());
|
values.put(REACTIONS_LAST_SEEN, System.currentTimeMillis());
|
||||||
|
|
||||||
db.update(getTableName(), values, null, null);
|
db.update(getTableName(), values, query, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addReaction(long messageId, @NonNull ReactionRecord reaction) {
|
public void addReaction(long messageId, @NonNull ReactionRecord reaction) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user