Fixed history display issue
This commit is contained in:
parent
3f65e2dc8c
commit
d0ca028ebe
1 changed files with 9 additions and 20 deletions
|
@ -824,18 +824,7 @@ public class ChatMessagesFragment extends Fragment
|
|||
|
||||
private void displayChatRoomHistory() {
|
||||
if (mChatRoom == null) return;
|
||||
ChatMessagesAdapter mEventsAdapter;
|
||||
if (mChatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt())) {
|
||||
mEventsAdapter =
|
||||
new ChatMessagesAdapter(
|
||||
this,
|
||||
mSelectionHelper,
|
||||
R.layout.chat_bubble,
|
||||
mChatRoom.getHistoryMessageEvents(MESSAGES_PER_PAGE),
|
||||
mParticipants,
|
||||
this);
|
||||
} else {
|
||||
mEventsAdapter =
|
||||
ChatMessagesAdapter mEventsAdapter =
|
||||
new ChatMessagesAdapter(
|
||||
this,
|
||||
mSelectionHelper,
|
||||
|
@ -843,7 +832,6 @@ public class ChatMessagesFragment extends Fragment
|
|||
mChatRoom.getHistoryEvents(MESSAGES_PER_PAGE),
|
||||
mParticipants,
|
||||
this);
|
||||
}
|
||||
mSelectionHelper.setAdapter(mEventsAdapter);
|
||||
mChatEventsList.setAdapter(mEventsAdapter);
|
||||
scrollToBottom();
|
||||
|
@ -1388,6 +1376,7 @@ public class ChatMessagesFragment extends Fragment
|
|||
@Override
|
||||
public void onEphemeralEvent(ChatRoom chatRoom, EventLog eventLog) {
|
||||
((ChatMessagesGenericAdapter) mChatEventsList.getAdapter()).addToHistory(eventLog);
|
||||
scrollToBottom();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue