diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-03-11 17:47:05 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-03-11 17:47:05 +0100 |
commit | 82fa29bfc5cbfe210345f17fab6341fae0870c0b (patch) | |
tree | ac3544a36f28720bac8a1dca84e68d40bf2d58cc /src/eu/siacs | |
parent | 49efe81644cdfc40fce609649546aabe2a5e070f (diff) |
possible fix for #9
Diffstat (limited to 'src/eu/siacs')
-rw-r--r-- | src/eu/siacs/conversations/persistance/DatabaseBackend.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/eu/siacs/conversations/persistance/DatabaseBackend.java index e2067141..81d4e4fb 100644 --- a/src/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -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 |