possible fix for #9

This commit is contained in:
Daniel Gultsch 2014-03-11 17:47:05 +01:00
parent 49efe81644
commit 82fa29bfc5

View file

@ -3,6 +3,7 @@ package eu.siacs.conversations.persistance;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.CopyOnWriteArrayList;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
@ -120,7 +121,7 @@ public class DatabaseBackend extends SQLiteOpenHelper {
}
public List<Message> getMessages(Conversation conversation, int limit) {
List<Message> list = new ArrayList<Message>();
List<Message> list = new CopyOnWriteArrayList<Message>();
SQLiteDatabase db = this.getReadableDatabase();
String[] selectionArgs = { conversation.getUuid() };
Cursor cursor = db.query(Message.TABLENAME, null, Message.CONVERSATION