Scroll with thread when at the bottom

filtering
Floens 10 years ago
parent beecc62b29
commit 93d30e2b0a
  1. 5
      Clover/app/src/main/java/org/floens/chan/ui/layout/ThreadListLayout.java

@ -121,7 +121,12 @@ public class ThreadListLayout extends LinearLayout implements ReplyLayout.ReplyL
if (initial) { if (initial) {
reply.bindLoadable(showingThread.loadable); reply.bindLoadable(showingThread.loadable);
linearLayoutManager.scrollToPositionWithOffset(thread.loadable.listViewIndex, 0); linearLayoutManager.scrollToPositionWithOffset(thread.loadable.listViewIndex, 0);
} else {
if (linearLayoutManager.findLastVisibleItemPosition() == postAdapter.getItemCount() - 1) {
linearLayoutManager.scrollToPositionWithOffset(postAdapter.getItemCount() - 1, 0);
}
} }
postAdapter.setThread(thread); postAdapter.setThread(thread);
} }

Loading…
Cancel
Save