diff options
Diffstat (limited to 'java/com/android/incallui/rtt')
-rw-r--r-- | java/com/android/incallui/rtt/impl/RttChatAdapter.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/com/android/incallui/rtt/impl/RttChatAdapter.java b/java/com/android/incallui/rtt/impl/RttChatAdapter.java index 96ff58b79..160377889 100644 --- a/java/com/android/incallui/rtt/impl/RttChatAdapter.java +++ b/java/com/android/incallui/rtt/impl/RttChatAdapter.java @@ -134,13 +134,13 @@ public class RttChatAdapter extends RecyclerView.Adapter<ViewHolder> { rttChatMessage.append(newMessage); rttMessages.add(rttChatMessage); lastIndexOfLocalMessage = rttMessages.size() - 1; - notifyItemInserted(lastIndexOfLocalMessage); + notifyItemInserted(toItemPosition(lastIndexOfLocalMessage)); } else { rttChatMessage.append(newMessage); // Clear empty message bubble. if (TextUtils.isEmpty(rttChatMessage.getContent())) { rttMessages.remove(lastIndexOfLocalMessage); - notifyItemRemoved(lastIndexOfLocalMessage); + notifyItemRemoved(toItemPosition(lastIndexOfLocalMessage)); lastIndexOfLocalMessage = -1; } else { notifyItemChanged(toItemPosition(lastIndexOfLocalMessage)); |