do not synchronize twice when adding status and date bubbles

This commit is contained in:
Daniel Gultsch 2019-04-27 15:24:37 +02:00
parent d8010d7a33
commit 7c35f28633

View file

@ -2279,15 +2279,8 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
this.binding.textSendButton.setImageResource(SendButtonTool.getSendButtonImageResource(getActivity(), action, status));
}
protected void updateDateSeparators() {
synchronized (this.messageList) {
DateSeparator.addAll(this.messageList);
}
}
protected void updateStatusMessages() {
updateDateSeparators();
synchronized (this.messageList) {
DateSeparator.addAll(this.messageList);
if (showLoadMoreMessages(conversation)) {
this.messageList.add(0, Message.createLoadMoreMessage(conversation));
}
@ -2384,7 +2377,6 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
}
}
}
private void stopScrolling() {
long now = SystemClock.uptimeMillis();