Package com.example.breeze_seas
Class EventCommentsSectionController
java.lang.Object
com.example.breeze_seas.EventCommentsSectionController
EventCommentsSectionController binds the reusable inline comments section used by event screens.
-
Constructor Summary
ConstructorsConstructorDescriptionEventCommentsSectionController(androidx.fragment.app.Fragment hostFragment, android.view.View rootView) Creates a reusable controller for the inline comments section. -
Method Summary
Modifier and TypeMethodDescriptionvoidAttaches the current event/user context and refreshes the visible comments UI.voidAttaches the current event/user context and explicitly controls organizer moderation mode.voidAttaches the current event/user context with admin moderation mode enabled.voidrelease()Stops the realtime listener owned by this controller.
-
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
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
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. WhencanAdminCommentsistrue, 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.
-