Skip to content

feat(ui/auth): Guest Mode Architecture, Trailer Integration

SHAFIZADA SULEYMAN requested to merge feature/guest-restrictions into main

Summary

This MR introduces a robust Guest Authorization System to prevent crashes and restrict access to personalized features for non-logged-in users. It also completes the Movie Details feature set by adding YouTube trailer support and finalizes the app's visual polish with Light/Dark mode fixes and grid layout adjustments.

Key Changes

1. Guest Mode & Security

  • Gatekeeping Logic: Implemented GuestManager to intercept navigation to restricted areas (Watchlist, Favorites, Quiz).
  • Quiz Protection: Added a check in QuizFragment to prevent crashes when guests (who have no watchlists) try to load the game.
  • Navigation Interception: Updated MainActivity to block the "For You" tab for guests, showing a login prompt instead.

2. Movie Details & Features

  • Trailers: Integrated YouTube support. Clicking the "Trailer" button in the Details screen now launches the trailer via Intent.
  • Action Sheet Fixes: Resolved an issue where the "Like" status in the bottom sheet was not syncing correctly with the database state.

How to Test

  1. Guest Mode:
    • Login as Guest.
    • Try to click "Quiz" or "For You". Verify the "Account Required" dialog appears.
  2. Trailers:
    • Login as a User.
    • Open a movie (e.g., "Zootopia 2").
    • Click the Trailer button and verify it opens YouTube/Browser.
  3. Theming:
    • Toggle your phone's system theme between Light and Dark.
    • Verify text on the Home and Search screens remains visible in both modes.
  4. Grid:
    • Verify the Search and Home screen lists display movies in a clean 2-column grid.

Merge request reports