1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-26 02:42:16 -05:00

MessageListAdapter: Synchonize the addMessage() method as the LinkedList may throw an ConcurrentModificationException

This commit is contained in:
Sebastian Kaspari 2010-03-10 23:27:24 +01:00
parent 3a3e4ae822
commit 35f430ad9b

View File

@ -73,7 +73,7 @@ public class MessageListAdapter extends BaseAdapter
* *
* @param message * @param message
*/ */
public void addMessage(Message message) public synchronized void addMessage(Message message)
{ {
messages.add(message.renderTextView(context)); messages.add(message.renderTextView(context));
notifyDataSetChanged(); notifyDataSetChanged();