Possible fix for unnecessary thread post reloading (issue #327).

main
Vavassor 8 years ago
parent 0922687842
commit f5450dc54a
  1. 2
      app/src/main/java/com/keylesspalace/tusky/adapter/ThreadAdapter.java

@ -103,7 +103,7 @@ public class ThreadAdapter extends RecyclerView.Adapter implements AdapterItemRe
// In case of refresh, remove old ancestors and descendants first. We'll remove all blindly, // In case of refresh, remove old ancestors and descendants first. We'll remove all blindly,
// as we have no guarantee on their order to be the same as before // as we have no guarantee on their order to be the same as before
int oldSize = statuses.size(); int oldSize = statuses.size();
if (oldSize > 0) { if (oldSize > 1) {
mainStatus = statuses.get(statusIndex); mainStatus = statuses.get(statusIndex);
statuses.clear(); statuses.clear();
notifyItemRangeRemoved(0, oldSize); notifyItemRangeRemoved(0, oldSize);

Loading…
Cancel
Save