Merged
Conversation
This commit refactors the bookmark functionality and navigation logic within the application.
**Key Changes:**
* **BookmarkSheet:**
* Reordered parameters in `BookmarkBottomSheet` for better readability.
* Modified `LoginNavigation` effect to pass the source screen (MovieDetails with bookmark sheet visibility) when navigating to Login.
* **HomeViewModel:**
* Reorganized initialization logic into a new `initializeData` function.
* Improved loading state management by introducing separate loading flags for popular and top-rated media (`isPopularLoading`, `isTopRatedLoading`).
* Refactored retry logic to re-initialize all relevant data sections.
* Streamlined function definitions and parameter order.
* **MovieDetailsViewModel:**
* Added logic to update `isBookmarkSheetVisible` in the UI state based on navigation arguments.
* **Navigation:**
* Updated `navigateToLogin` and `navigateToLoginWithPopUp` to correctly pass the source screen.
* Adjusted `navigateToMovieDetails` to include `isBookmarkSheetVisible` parameter.
* Modified `Login` screen definition in `Screen.kt` to handle source screen passing more effectively.
* Updated navigation graphs (`mainNavGraph.kt`, `authNavGraph.kt`) to reflect changes in screen definitions and navigation arguments.
* **HomeScreenUiState:**
* Added `isRecentWatchLoading` flag.
* Updated the general `isLoading` property to consider all individual loading states.
* **HomeScreen:**
* Passed `bookmarkedMovieId` to `BookmarkBottomSheet`.
* Updated loading state checks for Popular and Continue Watching sections to use specific loading flags.
* Renamed `homeScreenContract` to `contract` in `HomeScreenContent` for conciseness.
Abdulrahman-Ragab-01
previously approved these changes
Aug 22, 2025
ahmeddsamii
previously approved these changes
Aug 22, 2025
# Conflicts: # presentation/src/main/java/com/london/presentation/feature/details/movie/MovieDetailsViewModel.kt
22258a6
Contributor
|
[London Bot] Metrics Update Status 📊 PR metrics successfully updated for event: |
Contributor
|
[London Bot] Auto-update Status ✅ Branch successfully updated from |
Code Coverage Summary
|
yusufnasserdev
approved these changes
Aug 22, 2025
ahmeddsamii
approved these changes
Aug 22, 2025
marwanqashwa
approved these changes
Aug 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Type of Change
Changes Made
Testing
Screenshots
Checklist