mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Remove unbounded conversation list query.
This commit is contained in:
committed by
Alan Evans
parent
aa3eb78956
commit
7ef77bf16c
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -604,10 +604,6 @@ public class ThreadDatabase extends Database {
|
||||
return threadRecords;
|
||||
}
|
||||
|
||||
public Cursor getConversationList() {
|
||||
return getConversationList("0");
|
||||
}
|
||||
|
||||
public Cursor getArchivedConversationList() {
|
||||
return getConversationList("1");
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user