Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (final String id : followinglist) {
- collectionReference.whereEqualTo("publisher", id).limit(postCount).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
- @Override
- public void onComplete(@NonNull Task<QuerySnapshot> task) {
- if (task.isSuccessful()) {
- postList.clear();
- for (DocumentSnapshot snapshot : task.getResult()) {
- Post post = snapshot.toObject(Post.class);
- postList.add(post);
- }
- postAdapter.setmPost(postList);
- }
- if (postList.size() > 4) {
- postAdapter.setLoading();
- }
- if (postList.size() == postCount)setLoadMore();
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement