Fix incorrect unread count after sending scheduled messages.
This commit is contained in:
parent
a91a13cead
commit
b243eee4ce
1 changed files with 1 additions and 1 deletions
|
@ -1703,7 +1703,7 @@ public class MessageTable extends DatabaseTable implements MessageTypes, Recipie
|
||||||
SQLiteDatabase db = databaseHelper.getSignalReadableDatabase();
|
SQLiteDatabase db = databaseHelper.getSignalReadableDatabase();
|
||||||
String[] projection = SqlUtil.COUNT;
|
String[] projection = SqlUtil.COUNT;
|
||||||
SqlUtil.Query meaningfulMessagesQuery = buildMeaningfulMessagesQuery(threadId);
|
SqlUtil.Query meaningfulMessagesQuery = buildMeaningfulMessagesQuery(threadId);
|
||||||
String where = meaningfulMessagesQuery.getWhere() + " AND " + DATE_RECEIVED + " >= ?";
|
String where = meaningfulMessagesQuery.getWhere() + " AND " + DATE_RECEIVED + " >= ? AND NOT (" + getOutgoingTypeClause() + ")";
|
||||||
String[] whereArgs = SqlUtil.appendArg(meaningfulMessagesQuery.getWhereArgs(), String.valueOf(afterTime));
|
String[] whereArgs = SqlUtil.appendArg(meaningfulMessagesQuery.getWhereArgs(), String.valueOf(afterTime));
|
||||||
|
|
||||||
try (Cursor cursor = db.query(TABLE_NAME, projection, where, whereArgs, null, null, null, "1")) {
|
try (Cursor cursor = db.query(TABLE_NAME, projection, where, whereArgs, null, null, null, "1")) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue