Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2083 from vector-im/riot_2081
Browse files Browse the repository at this point in the history
BF: Room: Events with unexpected timestamps get stuck at the bottom of the history
  • Loading branch information
manuroe authored Mar 16, 2018
2 parents 3da0d08 + 19f1d2c commit e4c2152
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -724,15 +724,15 @@ public View getView(int position, View convertView, ViewGroup parent) {

@Override
public void notifyDataSetChanged() {
// the event with invalid timestamp must be pushed at the end of the history
// undelivered events must be pushed at the end of the history
this.setNotifyOnChange(false);
List<MessageRow> undeliverableEvents = new ArrayList<>();

for (int i = 0; i < getCount(); i++) {
MessageRow row = getItem(i);
Event event = row.getEvent();

if ((null != event) && (!event.isValidOriginServerTs() || event.isUnkownDevice())) {
if ((null != event) && (event.isUndeliverable() || event.isUnkownDevice())) {
undeliverableEvents.add(row);
remove(row);
i--;
Expand Down

0 comments on commit e4c2152

Please sign in to comment.