Account for archival and meaningful message status in unread count query.
This commit is contained in:
parent
92c6a84075
commit
6743861630
1 changed files with 1 additions and 1 deletions
|
@ -519,7 +519,7 @@ public class ThreadDatabase extends Database {
|
||||||
public long getUnreadThreadCount() {
|
public long getUnreadThreadCount() {
|
||||||
SQLiteDatabase db = databaseHelper.getSignalReadableDatabase();
|
SQLiteDatabase db = databaseHelper.getSignalReadableDatabase();
|
||||||
String[] projection = SqlUtil.buildArgs("COUNT(*)");
|
String[] projection = SqlUtil.buildArgs("COUNT(*)");
|
||||||
String where = READ + " != 1";
|
String where = READ + " != " + ReadStatus.READ.serialize() + " AND " + ARCHIVED + " = 0 AND " + MEANINGFUL_MESSAGES + " != 0";
|
||||||
|
|
||||||
try (Cursor cursor = db.query(TABLE_NAME, projection, where, null, null, null, null)) {
|
try (Cursor cursor = db.query(TABLE_NAME, projection, where, null, null, null, null)) {
|
||||||
if (cursor != null && cursor.moveToFirst()) {
|
if (cursor != null && cursor.moveToFirst()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue