mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Implement new reaction notifications.
This commit is contained in:
@@ -350,9 +350,15 @@ public abstract class MessagingDatabase extends Database implements MmsSmsColumn
|
||||
}
|
||||
|
||||
private void setReactions(@NonNull SQLiteDatabase db, long messageId, @NonNull ReactionList reactionList) {
|
||||
ContentValues values = new ContentValues(1);
|
||||
ContentValues values = new ContentValues(1);
|
||||
boolean hasReactions = reactionList.getReactionsCount() != 0;
|
||||
|
||||
values.put(REACTIONS, reactionList.getReactionsList().isEmpty() ? null : reactionList.toByteArray());
|
||||
values.put(REACTIONS_UNREAD, reactionList.getReactionsCount() != 0 ? 1 : 0);
|
||||
values.put(REACTIONS_UNREAD, hasReactions ? 1 : 0);
|
||||
|
||||
if (hasReactions) {
|
||||
values.put(NOTIFIED, 0);
|
||||
}
|
||||
|
||||
String query = ID + " = ?";
|
||||
String[] args = new String[] { String.valueOf(messageId) };
|
||||
|
||||
Reference in New Issue
Block a user