Advertisement
Guest User

Untitled

a guest
Aug 15th, 2020
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.91 KB | None | 0 0
  1. for (final String id : followinglist) {
  2.             collectionReference.whereEqualTo("publisher", id).limit(postCount).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
  3.                 @Override
  4.                 public void onComplete(@NonNull Task<QuerySnapshot> task) {
  5.                     if (task.isSuccessful()) {
  6.                         postList.clear();
  7.                         for (DocumentSnapshot snapshot : task.getResult()) {
  8.                             Post post = snapshot.toObject(Post.class);
  9.                                 postList.add(post);
  10.                         }
  11.                         postAdapter.setmPost(postList);
  12.  
  13.                     }
  14.                     if (postList.size() > 4) {
  15.                         postAdapter.setLoading();
  16.                     }
  17.  
  18.                     if (postList.size() == postCount)setLoadMore();
  19.                 }
  20.             });
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement