synchronize around getting last visibile uuid

This commit is contained in:
Daniel Gultsch 2018-04-04 20:07:08 +02:00
parent 4f2c3df329
commit 41972e94eb
1 changed files with 14 additions and 12 deletions

View File

@ -1581,6 +1581,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
if (binding == null) { if (binding == null) {
return null; return null;
} }
synchronized (this.messageList) {
int pos = binding.messagesView.getLastVisiblePosition(); int pos = binding.messagesView.getLastVisiblePosition();
if (pos >= 0) { if (pos >= 0) {
Message message = null; Message message = null;
@ -1597,6 +1598,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
return message.getUuid(); return message.getUuid();
} }
} }
}
return null; return null;
} }