synchronize around getting last visibile uuid
This commit is contained in:
parent
4f2c3df329
commit
41972e94eb
|
@ -1581,10 +1581,11 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
|||
if (binding == null) {
|
||||
return null;
|
||||
}
|
||||
synchronized (this.messageList) {
|
||||
int pos = binding.messagesView.getLastVisiblePosition();
|
||||
if (pos >= 0) {
|
||||
Message message = null;
|
||||
for(int i = pos ; i >= 0; --i) {
|
||||
for (int i = pos; i >= 0; --i) {
|
||||
message = (Message) binding.messagesView.getItemAtPosition(i);
|
||||
if (message.getType() != Message.TYPE_STATUS) {
|
||||
break;
|
||||
|
@ -1597,6 +1598,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
|||
return message.getUuid();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue