1) When sending an SMS or MMS to multiple recipients, only show one ConversationItem, but provide statistics on the number of recipients delivered to. 2) Still break up the messages for secure and insecure messages.
30 lines
952 B
Java
30 lines
952 B
Java
package org.thoughtcrime.securesms.database.loaders;
|
|
|
|
import android.content.Context;
|
|
import android.database.Cursor;
|
|
import android.support.v4.content.CursorLoader;
|
|
|
|
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
|
|
|
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) {
|
|
super(context);
|
|
this.context = context.getApplicationContext();
|
|
this.threadId = threadId;
|
|
this.isGroupConversation = isGroupConversation;
|
|
}
|
|
|
|
@Override
|
|
public Cursor loadInBackground() {
|
|
if (!isGroupConversation) {
|
|
return DatabaseFactory.getMmsSmsDatabase(context).getConversation(threadId);
|
|
} else {
|
|
return DatabaseFactory.getMmsSmsDatabase(context).getCollatedGroupConversation(threadId);
|
|
}
|
|
}
|
|
}
|