Remove unbounded conversation list query.

This commit is contained in:
Greyson Parrelli
2021-01-03 00:50:01 -05:00
committed by Alan Evans
parent aa3eb78956
commit 7ef77bf16c
3 changed files with 2 additions and 12 deletions

View File

@@ -40,12 +40,6 @@ public class ShareReminder extends Reminder {
return false;
}
Cursor cursor = null;
try {
cursor = DatabaseFactory.getThreadDatabase(context).getConversationList();
return cursor.getCount() >= 1;
} finally {
if (cursor != null) cursor.close();
}
return DatabaseFactory.getThreadDatabase(context).getUnarchivedConversationListCount() >= 1;
}
}

View File

@@ -604,10 +604,6 @@ public class ThreadDatabase extends Database {
return threadRecords;
}
public Cursor getConversationList() {
return getConversationList("0");
}
public Cursor getArchivedConversationList() {
return getConversationList("1");
}

View File

@@ -149,7 +149,7 @@ public final class LiveRecipientCache {
ThreadDatabase threadDatabase = DatabaseFactory.getThreadDatabase(context);
List<Recipient> recipients = new ArrayList<>();
try (ThreadDatabase.Reader reader = threadDatabase.readerFor(threadDatabase.getConversationList())) {
try (ThreadDatabase.Reader reader = threadDatabase.readerFor(threadDatabase.getRecentConversationList(CACHE_WARM_MAX, false, false))) {
int i = 0;
ThreadRecord record = null;