mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Do not include self in recents list for gift badging.
This commit is contained in:
committed by
Cody Henthorne
parent
b3086e595f
commit
25788ef751
@@ -594,10 +594,10 @@ public class ThreadDatabase extends Database {
|
||||
}
|
||||
|
||||
public Cursor getRecentConversationList(int limit, boolean includeInactiveGroups, boolean hideV1Groups) {
|
||||
return getRecentConversationList(limit, includeInactiveGroups, false, false, hideV1Groups, false);
|
||||
return getRecentConversationList(limit, includeInactiveGroups, false, false, hideV1Groups, false, false);
|
||||
}
|
||||
|
||||
public Cursor getRecentConversationList(int limit, boolean includeInactiveGroups, boolean individualsOnly, boolean groupsOnly, boolean hideV1Groups, boolean hideSms) {
|
||||
public Cursor getRecentConversationList(int limit, boolean includeInactiveGroups, boolean individualsOnly, boolean groupsOnly, boolean hideV1Groups, boolean hideSms, boolean hideSelf) {
|
||||
SQLiteDatabase db = databaseHelper.getSignalReadableDatabase();
|
||||
String query = !includeInactiveGroups ? MEANINGFUL_MESSAGES + " != 0 AND (" + GroupDatabase.TABLE_NAME + "." + GroupDatabase.ACTIVE + " IS NULL OR " + GroupDatabase.TABLE_NAME + "." + GroupDatabase.ACTIVE + " = 1)"
|
||||
: MEANINGFUL_MESSAGES + " != 0";
|
||||
@@ -620,6 +620,10 @@ public class ThreadDatabase extends Database {
|
||||
query += " AND " + RecipientDatabase.TABLE_NAME + "." + RecipientDatabase.FORCE_SMS_SELECTION + " = 0";
|
||||
}
|
||||
|
||||
if (hideSelf) {
|
||||
query += " AND " + RECIPIENT_ID + " != " + Recipient.self().getId().toLong();
|
||||
}
|
||||
|
||||
query += " AND " + ARCHIVED + " = 0";
|
||||
|
||||
if (SignalStore.releaseChannelValues().getReleaseChannelRecipientId() != null) {
|
||||
|
||||
Reference in New Issue
Block a user