mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-27 14:40:22 +00:00
Do not show SMS contacts as shortcuts if we're not the SMS app.
This commit is contained in:
committed by
Alex Hart
parent
fadd4ac61e
commit
8a49db650a
@@ -13,6 +13,7 @@ import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.transport.RetryLaterException;
|
||||
import org.thoughtcrime.securesms.util.ConversationUtil;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -67,7 +68,7 @@ public class ConversationShortcutUpdateJob extends BaseJob {
|
||||
int maxShortcuts = ConversationUtil.getMaxShortcuts(context);
|
||||
List<Recipient> ranked = new ArrayList<>(maxShortcuts);
|
||||
|
||||
try (ThreadDatabase.Reader reader = threadDatabase.readerFor(threadDatabase.getRecentConversationList(maxShortcuts, false, false))) {
|
||||
try (ThreadDatabase.Reader reader = threadDatabase.readerFor(threadDatabase.getRecentConversationList(maxShortcuts, false, false, true, !Util.isDefaultSmsProvider(context)))) {
|
||||
ThreadRecord record;
|
||||
while ((record = reader.getNext()) != null) {
|
||||
ranked.add(record.getRecipient().resolve());
|
||||
|
||||
Reference in New Issue
Block a user