Class EventListUtils

java.lang.Object
com.example.iconic_raffleevent.EventListUtils

public class EventListUtils extends Object
  • Constructor Details

    • EventListUtils

      public EventListUtils()
  • Method Details

    • showUserDetailsDialog

      public static void showUserDetailsDialog(android.content.Context context, User user, Event event, FirebaseAttendee firebaseAttendee, Runnable callback)
      Shows the user details dialog with options to cancel or delete the user.
      Parameters:
      context - The context of the calling activity.
      user - The user whose details need to be shown.
      event - The event object containing the lists.
      firebaseAttendee - The FirebaseAttendee controller for Firestore operations.
      callback - A callback to execute after successful deletion (e.g., refresh the UI).
    • deleteUserFromLists

      public static void deleteUserFromLists(android.content.Context context, Event event, String userId, FirebaseAttendee firebaseAttendee, Runnable callback)
      Deletes a user from all event lists: waitingList, invitedList, and registeredAttendees. If `event` is `null`, deletes the user globally from the Firestore database.
      Parameters:
      context - The context of the calling activity.
      event - The event object containing the lists (nullable for global deletion).
      userId - The ID of the user to delete.
      firebaseAttendee - The FirebaseAttendee controller for Firestore operations (nullable for global deletion).
      callback - A callback to execute after successful deletion (e.g., refresh the UI).
    • createNotification

      public static void createNotification(Event event, String userId)
      Create a notification and send it to the cancelled entrant
      Parameters:
      event - Event that the entrant is cancelled from
      userId - ID of the user that the notification is being sent too
    • removeLocation

      public static void removeLocation(Event event, String userId)
      Remove a users location from the events location map if geolocation is enabled
      Parameters:
      event - The Event that we are removing the users location from
      userId - ID of the user to be removed