fix(StatusDisplayItem/Quote): notify adapter separately
Only notifying the adapter once could lead to cases where the quoting status was merged with or replaced by the quote status. Separately notifying it seems to trigger the issue less often.
This commit is contained in:
@@ -722,10 +722,11 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
|
||||
assert (this instanceof StatusListFragment) || (this instanceof NotificationsListFragment);
|
||||
List<StatusDisplayItem> items=this.buildDisplayItems((T) parent);
|
||||
displayItems.subList(startIndex, endIndex+1).clear();
|
||||
adapter.notifyItemRangeRemoved(startIndex, endIndex+1);
|
||||
boolean isEmpty=displayItems.isEmpty();
|
||||
displayItems.addAll(startIndex, items);
|
||||
if(!isEmpty)
|
||||
adapter.notifyItemRangeChanged(startIndex, items.size());
|
||||
adapter.notifyItemRangeInserted(startIndex, items.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user