Commit baea6f07 authored by Grigory Fedorov's avatar Grigory Fedorov

ChatMessageAdapter: empty item is not added if hint is null.

parent 7725a2e3
...@@ -228,8 +228,12 @@ public class ChatMessageAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo ...@@ -228,8 +228,12 @@ public class ChatMessageAdapter extends RecyclerView.Adapter<RecyclerView.ViewHo
@Override @Override
public int getItemCount() { public int getItemCount() {
if (hint == null) {
return messages.size();
} else {
return messages.size() + 1; return messages.size() + 1;
} }
}
public MessageItem getMessageItem(int position) { public MessageItem getMessageItem(int position) {
if (position < messages.size()) { if (position < messages.size()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment