aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/github/daneren2005/dsub/adapter/EntryInfiniteGridAdapter.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/EntryInfiniteGridAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/EntryInfiniteGridAdapter.java
index a757149a..6c1c14da 100644
--- a/app/src/main/java/github/daneren2005/dsub/adapter/EntryInfiniteGridAdapter.java
+++ b/app/src/main/java/github/daneren2005/dsub/adapter/EntryInfiniteGridAdapter.java
@@ -89,6 +89,10 @@ public class EntryInfiniteGridAdapter extends EntryGridAdapter {
this.type = type;
this.extra = extra;
this.size = size;
+
+ if(super.getItemCount() < size) {
+ allLoaded = true;
+ }
}
public void loadMore() {
@@ -111,7 +115,7 @@ public class EntryInfiniteGridAdapter extends EntryGridAdapter {
appendCachedData(newData);
loading = false;
- if(newData.isEmpty()) {
+ if(newData.size() < size) {
allLoaded = true;
notifyDataSetChanged();
}