Migrate Setting Blocked Users View from XML to Compose#642
Migrate Setting Blocked Users View from XML to Compose#642
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the blocked users view from an XML-based implementation to a Compose-based UI and refactors related viewmodel logic to use StateFlow.
- Replaces LiveData with StateFlow in ProfileViewModel and ProfileSettingViewModel
- Introduces new Compose screens and components (e.g. BlockedUsersScreen, updated DropdownMenu)
- Removes legacy XML fragments and adapters related to block list functionality
Reviewed Changes
Copilot reviewed 16 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ProfileViewModel.kt | Refactored block/unblock status from LiveData to StateFlow using Status states |
| ProfileSettingViewModel.kt | Updated block list handling to use StateFlow with Resource wrappers |
| DropdownMenu.kt | Updated dropdown menu composables to include new blocking functionality |
| SettingsScreen.kt & SettingsNavigation.kt | Added onBlockUsersClick navigation and corresponding UI logic |
| BlockedUsersScreen.kt | Added a new Compose screen for displaying blocked users and handling unblock actions |
| ProfileScreen.kt & ProfileNavigation.kt | Integrated block user functionality in profile screens with dialogs and snackbar feedback |
| MypageNavigation.kt, MainScreen.kt, MainNavigator.kt | Updated navigation to include the blocked users route |
| SettingBlockFragment.kt, BlockListAdapter.kt, ProfileOptionFragment.kt | Removed legacy XML-based block components |
Files not reviewed (5)
- presentation/src/main/res/drawable/ic_blocked_users_empty.xml: Language not supported
- presentation/src/main/res/drawable/ic_menu_block.xml: Language not supported
- presentation/src/main/res/layout/fragment_setting_block.xml: Language not supported
- presentation/src/main/res/layout/item_block.xml: Language not supported
- presentation/src/main/res/navigation/nav_graph.xml: Language not supported
Comments suppressed due to low confidence (1)
presentation/src/main/java/daily/dayo/presentation/screen/profile/ProfileScreen.kt:98
- [nitpick] Consider renaming the lambda parameter 'reason' to 'memberId' for clarity, as it represents the user's memberId for blocking.
val onClickUserBlock: (String) -> Unit = { reason ->
…mprove clarity, consider setting showBlockDialog to false explicitly instead of toggling its value
…us.LOADING) instead of setting .value directly in requestUnblockMember Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…it represents the user's memberId for blocking.
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the blocked users view from an XML‐based implementation to a Compose-based implementation and updates profile and settings flows accordingly. Key changes include:
- Converting LiveData-based state management to StateFlow for block/unblock operations in viewmodels.
- Migrating UI components (e.g. dropdown menus, settings screens, and profile screens) to Compose layouts.
- Removing legacy XML fragments and adapter classes for blocked users.
Reviewed Changes
Copilot reviewed 16 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ProfileViewModel.kt | Replaces LiveData with StateFlow for block/unblock status updates. |
| ProfileSettingViewModel.kt | Updates block list handling from LiveData to StateFlow. |
| DropdownMenu.kt | Refactors dropdown menu functions to use a multi-line parameter format and rounded corners. |
| SettingsScreen.kt, SettingsNavigation.kt | Adds new navigation and parameter handling for blocked users. |
| BlockedUsersScreen.kt | Introduces a new Compose screen for viewing blocked users. |
| ProfileScreen.kt, ProfileNavigation.kt | Integrates block user actions with confirmation dialogs and snackbar feedback. |
| MypageNavigation.kt, MainScreen.kt, MainNavigator.kt | Adds navigation support for the new blocked users screen. |
| SettingBlockFragment.kt, BlockListAdapter.kt, ProfileOptionFragment.kt | Removes XML-based components no longer needed after the migration. |
Files not reviewed (5)
- presentation/src/main/res/drawable/ic_blocked_users_empty.xml: Language not supported
- presentation/src/main/res/drawable/ic_menu_block.xml: Language not supported
- presentation/src/main/res/layout/fragment_setting_block.xml: Language not supported
- presentation/src/main/res/layout/item_block.xml: Language not supported
- presentation/src/main/res/navigation/nav_graph.xml: Language not supported
# Conflicts: # presentation/src/main/java/daily/dayo/presentation/view/DropdownMenu.kt
yuni-ju
left a comment
There was a problem hiding this comment.
차단 관리 페이지에 들어갔을 떄 정상적으로 응답이 왔음에도 불구하고 로딩에 실패 했다는 화면이 뜹니다! 재시도를 계속 눌러도 동일한 문제가 발생합니다.
응답 코드 200이고, body가 {"data":[],"count":0}인 경우에 문제가 발생했습니다!
차단 유저가 있는 경우에는 정상적으로 뜨는 것을 보니 차단 유저가 0명인 경우에 발생하는 문제인 것 같습니다.
@yuni-ju 네트워크 재시도 코드 추가간 덮어씌워졌던 부분에 대한 원복을 통해 수정하였습니다 |
Migrate Setting Blocked Users View from XML to Compose
작업사항
참고