Class FollowProvider

java.lang.Object
com.kernelcrew.moodapp.data.FollowProvider

public class FollowProvider extends Object
  • Method Details

    • getInstance

      public static FollowProvider getInstance()
    • listenForFollowing

      public com.google.firebase.firestore.ListenerRegistration listenForFollowing(String userUid, com.google.firebase.firestore.EventListener<com.google.firebase.firestore.QuerySnapshot> listener)
    • sendRequest

      public com.google.android.gms.tasks.Task<Void> sendRequest(String targetUid, String requesterUid)
    • deleteRequest

      public com.google.android.gms.tasks.Task<Void> deleteRequest(String targetUid, String requesterUid)
    • acceptRequest

      public com.google.android.gms.tasks.Task<Void> acceptRequest(String targetUid, String requesterUid)
    • fetchFollowers

      public com.google.android.gms.tasks.Task<List<User>> fetchFollowers(String userUid)
    • fetchFollowing

      public com.google.android.gms.tasks.Task<List<User>> fetchFollowing(String userUid)
    • unfollow

      public com.google.android.gms.tasks.Task<Void> unfollow(String userUid, String followedUid)
    • isFollowing

      public com.google.android.gms.tasks.Task<Boolean> isFollowing(String userUid, String targetUid)
      Returns true if userUid is already following targetUid
    • hasPendingRequest

      public com.google.android.gms.tasks.Task<Boolean> hasPendingRequest(String targetUid, String requesterUid)
      Returns true if requesterUid has a pending follow request to targetUid