Set lastViewed on initial load

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

@ -229,15 +229,18 @@ 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) {
int more = postsSize - notificationPostCount;
notificationPostCount = postsSize;
} else if (postsSize > notificationPostCount) {
int more = postsSize - notificationPostCount;
notificationPostCount = postsSize;
threadPresenterCallback.showNewPostsNotification(true, more);
}
threadPresenterCallback.showNewPostsNotification(true, more);
}
}

Loading…
Cancel
Save