Omit blocked contacts from recents.

This commit is contained in:
Alex Hart
2022-07-13 14:51:36 -03:00
committed by Cody Henthorne
parent ecbc2d30ca
commit 15111b2792
5 changed files with 151 additions and 3 deletions

View File

@@ -133,7 +133,7 @@ open class RecipientDatabase(context: Context, databaseHelper: SignalDatabase) :
const val GROUP_ID = "group_id"
const val DISTRIBUTION_LIST_ID = "distribution_list_id"
const val GROUP_TYPE = "group_type"
private const val BLOCKED = "blocked"
const val BLOCKED = "blocked"
private const val MESSAGE_RINGTONE = "message_ringtone"
private const val MESSAGE_VIBRATE = "message_vibrate"
private const val CALL_RINGTONE = "call_ringtone"

View File

@@ -625,6 +625,7 @@ public class ThreadDatabase extends Database {
}
query += " AND " + ARCHIVED + " = 0";
query += " AND " + RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.BLOCKED + " = 0";
if (SignalStore.releaseChannelValues().getReleaseChannelRecipientId() != null) {
query += " AND " + RECIPIENT_ID + " != " + SignalStore.releaseChannelValues().getReleaseChannelRecipientId().toLong();