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:
parent
9ddd45ed92
commit
4e683a9717
@ -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)"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user