Class EventCommentsSectionController

java.lang.Object
com.example.breeze_seas.EventCommentsSectionController

public final class EventCommentsSectionController extends Object
EventCommentsSectionController binds the reusable inline comments section used by event screens.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EventCommentsSectionController(androidx.fragment.app.Fragment hostFragment, android.view.View rootView)
    Creates a reusable controller for the inline comments section.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bind(Event event, User user)
    Attaches the current event/user context and refreshes the visible comments UI.
    void
    bind(Event event, User user, boolean organizerViewerOverride)
    Attaches the current event/user context and explicitly controls organizer moderation mode.
    void
    bind(Event event, User user, boolean organizerViewerOverride, boolean canAdminComments)
    Attaches the current event/user context with admin moderation mode enabled.
    void
    Stops the realtime listener owned by this controller.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EventCommentsSectionController

      public EventCommentsSectionController(@NonNull androidx.fragment.app.Fragment hostFragment, @NonNull android.view.View rootView)
      Creates a reusable controller for the inline comments section.
      Parameters:
      hostFragment - Fragment that owns the comments section.
      rootView - Root event-screen view containing the included comments layout.
  • Method Details

    • bind

      public void bind(@Nullable Event event, @Nullable User user)
      Attaches the current event/user context and refreshes the visible comments UI.
      Parameters:
      event - Event whose comments should be displayed.
      user - Current signed-in app user, if available.
    • bind

      public void bind(@Nullable Event event, @Nullable User user, boolean organizerViewerOverride)
      Attaches the current event/user context and explicitly controls organizer moderation mode.
      Parameters:
      event - Event whose comments should be displayed.
      user - Current signed-in app user, if available.
      organizerViewerOverride - Whether the current screen should behave as organizer view.
    • bind

      public void bind(@Nullable Event event, @Nullable User user, boolean organizerViewerOverride, boolean canAdminComments)
      Attaches the current event/user context with admin moderation mode enabled. When canAdminComments is true, delete is shown on all comments regardless of whether the author is an organizer or entrant.
      Parameters:
      event - Event whose comments should be displayed.
      user - Current signed-in app user, if available.
      organizerViewerOverride - Whether the current screen should behave as organizer view.
      canAdminComments - Whether all comments should show a delete button.
    • release

      public void release()
      Stops the realtime listener owned by this controller.