mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-10-31 15:35:04 -04:00
MessageListAdapter: Fixed wrong message order on addBulkMessages - and clearBuffer() after adding (ConversationActivity)
This commit is contained in:
parent
512ddacaf5
commit
77c3a2423f
@ -176,6 +176,7 @@ public class ConversationActivity extends Activity implements ServiceConnection,
|
|||||||
|
|
||||||
if (mAdapter != null) {
|
if (mAdapter != null) {
|
||||||
mAdapter.addBulkMessages(conversation.getBuffer());
|
mAdapter.addBulkMessages(conversation.getBuffer());
|
||||||
|
conversation.clearBuffer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class MessageListAdapter extends BaseAdapter
|
|||||||
Context mContext = this.context;
|
Context mContext = this.context;
|
||||||
int mSize = messages.size();
|
int mSize = messages.size();
|
||||||
|
|
||||||
for (int i = 0; i < mSize; i++) {
|
for (int i = mSize - 1; i > -1; i--) {
|
||||||
mMessages.add(messages.get(i).renderTextView(mContext));
|
mMessages.add(messages.get(i).renderTextView(mContext));
|
||||||
|
|
||||||
if (mMessages.size() > Conversation.HISTORY_SIZE) {
|
if (mMessages.size() > Conversation.HISTORY_SIZE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user