Set lastViewed on initial load

multisite
Floens 10 years ago
parent 64a77b601b
commit b9336356d3
  1. 9
      Clover/app/src/main/java/org/floens/chan/core/presenter/ThreadPresenter.java

@ -229,17 +229,20 @@ public class ThreadPresenter implements ChanLoader.ChanLoaderCallback, PostAdapt
if (loadable.isThreadMode()) {
int postsSize = result.posts.size();
if (loadable.lastViewed < 0) {
loadable.lastViewed = result.posts.get(result.posts.size() - 1).no;
}
if (notificationPostCount < 0) {
notificationPostCount = postsSize;
} else {
if (postsSize > notificationPostCount) {
} else if (postsSize > notificationPostCount) {
int more = postsSize - notificationPostCount;
notificationPostCount = postsSize;
threadPresenterCallback.showNewPostsNotification(true, more);
}
}
}
chanLoader.setAutoLoadMore(isWatching());
showPosts();

Loading…
Cancel
Save