mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 11:22:21 +00:00
First cut at group messaging refactor.
This commit is contained in:
@@ -10,21 +10,15 @@ public class ConversationLoader extends CursorLoader {
|
||||
|
||||
private final Context context;
|
||||
private final long threadId;
|
||||
private final boolean isGroupConversation;
|
||||
|
||||
public ConversationLoader(Context context, long threadId, boolean isGroupConversation) {
|
||||
public ConversationLoader(Context context, long threadId) {
|
||||
super(context);
|
||||
this.context = context.getApplicationContext();
|
||||
this.threadId = threadId;
|
||||
this.isGroupConversation = isGroupConversation;
|
||||
this.context = context.getApplicationContext();
|
||||
this.threadId = threadId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cursor loadInBackground() {
|
||||
if (!isGroupConversation) {
|
||||
return DatabaseFactory.getMmsSmsDatabase(context).getConversation(threadId);
|
||||
} else {
|
||||
return DatabaseFactory.getMmsSmsDatabase(context).getCollatedGroupConversation(threadId);
|
||||
}
|
||||
return DatabaseFactory.getMmsSmsDatabase(context).getConversation(threadId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user