-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] 친구 프로필 / 프로필 수정 개선 #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d3d2b99
fix: backhandler exit 이벤트 적용
rhkrwngud445 e7af545
fix: call, messageButton 내부 패딩 제거
rhkrwngud445 02b9eea
fix: profile 바텀 패딩 적용
rhkrwngud445 9a37e3a
fix: 홈 화면 닉네임 적용
rhkrwngud445 bd8b26f
feat: 친구 삭제 후 홈 화면 반영 구현
rhkrwngud445 c88d01f
feat: 홈 에러 메시지 변경
rhkrwngud445 141bc05
chore: 안쓰는 코드 제거
rhkrwngud445 d7886e1
fix: backhandler exit 이벤트 적용
rhkrwngud445 35ec8c0
fix: call, messageButton 내부 패딩 제거
rhkrwngud445 cf2d790
fix: profile 바텀 패딩 적용
rhkrwngud445 3607115
fix: 홈 화면 닉네임 적용
rhkrwngud445 403a169
feat: 친구 삭제 후 홈 화면 반영 구현
rhkrwngud445 4b47d8a
feat: 홈 에러 메시지 변경
rhkrwngud445 29409cc
chore: 안쓰는 코드 제거
rhkrwngud445 d2b31cd
Merge remote-tracking branch 'origin/feat/#43-improvement_friend_prof…
rhkrwngud445 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,19 @@ | ||
| package com.alarmy.near.presentation.feature.home.navigation | ||
|
|
||
| import androidx.hilt.navigation.compose.hiltViewModel | ||
| import androidx.navigation.NavController | ||
| import androidx.navigation.NavGraphBuilder | ||
| import androidx.navigation.NavOptions | ||
| import androidx.navigation.compose.composable | ||
| import com.alarmy.near.model.Friend | ||
| import com.alarmy.near.presentation.feature.friendprofile.FriendProfileViewModel | ||
| import com.alarmy.near.presentation.feature.friendprofileedittor.navigation.FRIEND_PROFILE_EDIT_COMPLETE_KEY | ||
| import com.alarmy.near.presentation.feature.home.HomeRoute | ||
| import com.alarmy.near.presentation.feature.home.HomeViewModel | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| const val HOME_FRIEND_DELETE_COMPLETE_KEY = "HOME_FRIEND_DELETE_COMPLETE_KEY" | ||
|
|
||
| @Serializable | ||
| object RouteHome | ||
|
|
||
|
|
@@ -25,6 +32,12 @@ fun NavGraphBuilder.homeNavGraph( | |
| onAddContactClick: () -> Unit = {}, | ||
| ) { | ||
| composable<RouteHome> { backStackEntry -> | ||
| val viewModel: HomeViewModel = hiltViewModel() | ||
| val friendId: String? = backStackEntry.savedStateHandle.get<String>(HOME_FRIEND_DELETE_COMPLETE_KEY) | ||
| friendId?.let { | ||
| viewModel.deleteFriend(it) | ||
| } | ||
| friendId | ||
|
||
| HomeRoute( | ||
| onShowErrorSnackBar = onShowErrorSnackBar, | ||
| onContactClick = onContactClick, | ||
|
|
||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존에
viewModel.errorEvent에서 전달되던Throwable객체를 사용하지 않고, 새로운IllegalStateException을 생성하여 하드코딩된 메시지를 전달하고 있습니다. 이 방식은 원래 발생했던 에러의 상세 정보를 잃게 만들어 디버깅을 어렵게 할 수 있습니다. 기존 구현처럼onShowErrorSnackBar(it)을 그대로 호출하여 원래의Throwable을 전달하는 것이 더 바람직해 보입니다.onShowErrorSnackBar의 구현을 보면null이거나message가 없는 경우를 이미 잘 처리하고 있습니다.