Fix some chat issues
This commit is contained in:
parent
7d61ddd0e7
commit
f487f9797c
2 changed files with 7 additions and 5 deletions
|
@ -141,17 +141,19 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneO
|
|||
}
|
||||
|
||||
private void scrollToEnd() {
|
||||
mHandler.post(new Runnable() {
|
||||
mHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
messagesScrollView.fullScroll(View.FOCUS_DOWN);
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMessageReceived(LinphoneAddress from, String message) {
|
||||
if (from.asStringUriOnly().equals(sipUri)) {
|
||||
displayMessage(previousMessageID + 1, message, getString(R.string.now_date_format), true, messagesLayout);
|
||||
scrollToEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
|
|||
}
|
||||
|
||||
private void changeCurrentFragment(FragmentsAvailable newFragmentType, Bundle extras) {
|
||||
if (newFragmentType == currentFragment) {
|
||||
if (newFragmentType == currentFragment && newFragmentType != FragmentsAvailable.CHAT) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue