1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2025-01-10 05:08:18 -05:00

ConversationActivity: onConversationMessage(): Use addBulkMessages()

This commit is contained in:
Sebastian Kaspari 2010-04-12 21:35:10 +02:00
parent 9ddd45ed92
commit 4e683a9717

View File

@ -311,14 +311,8 @@ public class ConversationActivity extends Activity implements ServiceConnection,
Conversation conversation = server.getConversation(target); Conversation conversation = server.getConversation(target);
MessageListAdapter adapter = conversation.getMessageListAdapter(); MessageListAdapter adapter = conversation.getMessageListAdapter();
while(conversation.hasBufferedMessages()) { if (conversation.hasBufferedMessages() && adapter != null) {
Message message = conversation.pollBufferedMessage(); adapter.addBulkMessages(conversation.getBuffer());
if (adapter != null) {
adapter.addMessage(message);
} else {
//"MessageListAdapter is null (conversation " + conversation.getName() + " has no adapter assigned)"
}
} }
} }