mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-20 13:08:07 +00:00
Fix scoll to bottom on new message
This commit is contained in:
parent
244997e986
commit
1b14f35ab3
2 changed files with 3 additions and 3 deletions
|
|
@ -587,6 +587,7 @@ public class ChatEventsAdapter extends ListSelectionAdapter {
|
|||
}
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
mFragment.scrollToBottom();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -655,9 +655,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
}
|
||||
|
||||
public void scrollToBottom() {
|
||||
if (((mChatEventsList.getLastVisiblePosition() >= (mEventsAdapter.getCount() - 1)) && (mChatEventsList.getFirstVisiblePosition() <= (mEventsAdapter.getCount() - 1)))) {
|
||||
mChatEventsList.setSelection(mEventsAdapter.getCount() - 1);
|
||||
}
|
||||
mChatEventsList.setSelection(mEventsAdapter.getCount() - 1);
|
||||
}
|
||||
|
||||
public String getRemoteSipUri() {
|
||||
|
|
@ -896,6 +894,7 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
}
|
||||
|
||||
mEventsAdapter.addToHistory(event);
|
||||
this.scrollToBottom();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue