Don't show MMS groups in recent Signal contacts list.
This commit is contained in:
parent
007ea43dc8
commit
a1245baf61
2 changed files with 9 additions and 2 deletions
|
@ -50,7 +50,7 @@ public class GroupDatabase extends Database {
|
||||||
private static final String AVATAR_DIGEST = "avatar_digest";
|
private static final String AVATAR_DIGEST = "avatar_digest";
|
||||||
private static final String TIMESTAMP = "timestamp";
|
private static final String TIMESTAMP = "timestamp";
|
||||||
private static final String ACTIVE = "active";
|
private static final String ACTIVE = "active";
|
||||||
private static final String MMS = "mms";
|
static final String MMS = "mms";
|
||||||
|
|
||||||
public static final String CREATE_TABLE =
|
public static final String CREATE_TABLE =
|
||||||
"CREATE TABLE " + TABLE_NAME +
|
"CREATE TABLE " + TABLE_NAME +
|
||||||
|
|
|
@ -375,7 +375,14 @@ public class ThreadDatabase extends Database {
|
||||||
|
|
||||||
public Cursor getRecentPushConversationList(int limit) {
|
public Cursor getRecentPushConversationList(int limit) {
|
||||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||||
String where = MESSAGE_COUNT + " != 0 AND (" + RecipientDatabase.REGISTERED + " = " + RecipientDatabase.RegisteredState.REGISTERED.getId() + " OR " + GroupDatabase.TABLE_NAME + "." + GroupDatabase.GROUP_ID + " NOT NULL)";
|
String where = MESSAGE_COUNT + " != 0 AND " +
|
||||||
|
"(" +
|
||||||
|
RecipientDatabase.REGISTERED + " = " + RecipientDatabase.RegisteredState.REGISTERED.getId() + " OR " +
|
||||||
|
"(" +
|
||||||
|
GroupDatabase.TABLE_NAME + "." + GroupDatabase.GROUP_ID + " NOT NULL AND " +
|
||||||
|
GroupDatabase.TABLE_NAME + "." + GroupDatabase.MMS + " = 0" +
|
||||||
|
")" +
|
||||||
|
")";
|
||||||
String query = createQuery(where, limit);
|
String query = createQuery(where, limit);
|
||||||
|
|
||||||
return db.rawQuery(query, null);
|
return db.rawQuery(query, null);
|
||||||
|
|
Loading…
Add table
Reference in a new issue