mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 08:22:39 +00:00
only load partial conversation by default
Closes #4252 Fixes #3911 // FREEBIE
This commit is contained in:
committed by
Moxie Marlinspike
parent
4a3faf9086
commit
ae97495c47
@@ -7,15 +7,21 @@ import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.util.AbstractCursorLoader;
|
||||
|
||||
public class ConversationLoader extends AbstractCursorLoader {
|
||||
private final long threadId;
|
||||
private final long threadId;
|
||||
private long limit;
|
||||
|
||||
public ConversationLoader(Context context, long threadId) {
|
||||
public ConversationLoader(Context context, long threadId, long limit) {
|
||||
super(context);
|
||||
this.threadId = threadId;
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public boolean hasLimit() {
|
||||
return limit > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cursor getCursor() {
|
||||
return DatabaseFactory.getMmsSmsDatabase(context).getConversation(threadId);
|
||||
return DatabaseFactory.getMmsSmsDatabase(context).getConversation(threadId, limit);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user