mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-04 20:28:21 +00:00
Increase number of recent conversations shown when sharing.
Intended to reduce the pain of #7202.
This commit is contained in:
parent
5650a02cfb
commit
d813275f42
@ -63,6 +63,7 @@ public class ContactsCursorLoader extends CursorLoader {
|
|||||||
ContactsDatabase.LABEL_COLUMN,
|
ContactsDatabase.LABEL_COLUMN,
|
||||||
ContactsDatabase.CONTACT_TYPE_COLUMN};
|
ContactsDatabase.CONTACT_TYPE_COLUMN};
|
||||||
|
|
||||||
|
private static final int RECENT_CONVERSATION_MAX = 25;
|
||||||
|
|
||||||
private final String filter;
|
private final String filter;
|
||||||
private final int mode;
|
private final int mode;
|
||||||
@ -163,8 +164,8 @@ public class ContactsCursorLoader extends CursorLoader {
|
|||||||
private Cursor getRecentConversationsCursor() {
|
private Cursor getRecentConversationsCursor() {
|
||||||
ThreadDatabase threadDatabase = DatabaseFactory.getThreadDatabase(getContext());
|
ThreadDatabase threadDatabase = DatabaseFactory.getThreadDatabase(getContext());
|
||||||
|
|
||||||
MatrixCursor recentConversations = new MatrixCursor(CONTACT_PROJECTION, 5);
|
MatrixCursor recentConversations = new MatrixCursor(CONTACT_PROJECTION, RECENT_CONVERSATION_MAX);
|
||||||
try (Cursor rawConversations = threadDatabase.getRecentConversationList(5)) {
|
try (Cursor rawConversations = threadDatabase.getRecentConversationList(RECENT_CONVERSATION_MAX)) {
|
||||||
ThreadDatabase.Reader reader = threadDatabase.readerFor(rawConversations);
|
ThreadDatabase.Reader reader = threadDatabase.readerFor(rawConversations);
|
||||||
ThreadRecord threadRecord;
|
ThreadRecord threadRecord;
|
||||||
while ((threadRecord = reader.getNext()) != null) {
|
while ((threadRecord = reader.getNext()) != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user