Do not include self in recents list for gift badging.

This commit is contained in:
Alex Hart
2022-05-16 09:47:41 -03:00
committed by Cody Henthorne
parent b3086e595f
commit 25788ef751
6 changed files with 12 additions and 5 deletions

View File

@@ -188,7 +188,7 @@ public class ContactsCursorLoader extends AbstractContactsCursorLoader {
ThreadDatabase threadDatabase = SignalDatabase.threads();
MatrixCursor recentConversations = ContactsCursorRows.createMatrixCursor(RECENT_CONVERSATION_MAX);
try (Cursor rawConversations = threadDatabase.getRecentConversationList(RECENT_CONVERSATION_MAX, flagSet(mode, DisplayMode.FLAG_INACTIVE_GROUPS), false, groupsOnly, hideGroupsV1(mode), !smsEnabled(mode))) {
try (Cursor rawConversations = threadDatabase.getRecentConversationList(RECENT_CONVERSATION_MAX, flagSet(mode, DisplayMode.FLAG_INACTIVE_GROUPS), false, groupsOnly, hideGroupsV1(mode), !smsEnabled(mode), false)) {
ThreadDatabase.Reader reader = threadDatabase.readerFor(rawConversations);
ThreadRecord threadRecord;
while ((threadRecord = reader.getNext()) != null) {

View File

@@ -34,6 +34,7 @@ class ContactSearchConfiguration private constructor(
val includeInactiveGroups: Boolean = false,
val includeGroupsV1: Boolean = false,
val includeSms: Boolean = false,
val includeSelf: Boolean = false,
override val includeHeader: Boolean,
override val expandConfig: ExpandConfig? = null
) : Section(SectionKey.RECENTS) {

View File

@@ -45,7 +45,8 @@ open class ContactSearchPagedDataSourceRepository(
section.mode == ContactSearchConfiguration.Section.Recents.Mode.INDIVIDUALS,
section.mode == ContactSearchConfiguration.Section.Recents.Mode.GROUPS,
!section.includeGroupsV1,
!section.includeSms
!section.includeSms,
!section.includeSelf
)
}