Fix updating of saved articles list

This commit is contained in:
Alex Sytnyk 2018-04-11 11:53:13 +03:00
parent c4d386d7f5
commit b298eb299c

View file

@ -58,8 +58,9 @@ public class SavedArticlesTabFragment extends BaseOsmAndFragment implements Wiki
public void savedArticlesUpdated() {
List<Object> newItems = getItems();
SavedArticlesDiffCallback diffCallback = new SavedArticlesDiffCallback(adapter.getItems(), newItems);
DiffUtil.DiffResult diffRes = DiffUtil.calculateDiff(diffCallback);
adapter.setItems(newItems);
DiffUtil.calculateDiff(diffCallback).dispatchUpdatesTo(adapter);
diffRes.dispatchUpdatesTo(adapter);
}
private List<Object> getItems() {