mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Account for archival and meaningful message status in unread count query.
This commit is contained in:
@@ -519,7 +519,7 @@ public class ThreadDatabase extends Database {
|
||||
public long getUnreadThreadCount() {
|
||||
SQLiteDatabase db = databaseHelper.getSignalReadableDatabase();
|
||||
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)) {
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
|
||||
Reference in New Issue
Block a user