-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Feature]가게 선택 다이얼로그 생성 #401
base: develop
Are you sure you want to change the base?
Conversation
|
||
@Preview | ||
@Composable | ||
fun PreviewMyStoreSelectDialog() { |
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.
fun PreviewMyStoreSelectDialog() { | |
private fun PreviewMyStoreSelectDialog() { |
val isEventExpanded: List<Boolean> = List(storeEvent?.size ?: 0) { false }, | ||
val isAllEventSelected: Boolean = false, | ||
val isSelectedEvent: MutableList<Int> = mutableListOf(), | ||
val isEditMode: Boolean = false | ||
val isEditMode: Boolean = false, |
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.
val isEditMode: Boolean = false, | |
val isEditMode: Boolean = false |
@@ -83,14 +78,20 @@ fun MyStoreDetailScreen( | |||
val context = LocalContext.current | |||
|
|||
LaunchedEffect(state.storeInfo) { | |||
viewModel.initOwnerShopList() | |||
viewModel.changeMyStoreInfo(storeId = state.storeId) |
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에서 변경할수있는 로직같습니다. 확인해주세요
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.
리뷰 확인해주세요~!
ModifyInfoSideEffect.NavigateToMyStoreScreen -> { | ||
storeInfoViewModel.modifyStoreInfo(state.storeInfo) | ||
storeInfoViewModel.refreshStoreList() | ||
onModifyButtonCLicked() |
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.
onModifyButtonCLicked() | |
onModifyButtonClicked() |
@@ -279,7 +279,11 @@ fun ModifyInfoScreen( | |||
when (it) { | |||
ModifyInfoSideEffect.NavigateToBackScreen -> onBackClicked() | |||
ModifyInfoSideEffect.NavigateToSettingOperatingTime -> onSettingOperatingClicked() | |||
else -> {} | |||
ModifyInfoSideEffect.NavigateToMyStoreScreen -> { | |||
storeInfoViewModel.modifyStoreInfo(state.storeInfo) |
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.
modify가 완료가 되고 refresh를 해야되는게 아닌가요? (실패했을경우?)
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.
그래서 뷰모델에서
modifyInfoUseCase.invoke(
storeId,
storeDetailInfo,
).apply {
this ?: postSideEffect(ModifyInfoSideEffect.NavigateToMyStoreScreen)
}
이 코드를 통해 ErrorHandler가 null일 때 ModifyInfoSideEffect.NavigateToMyStoreScreen를 보내는 것으로 구현했습니다!
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.
LGTM 수고하셨습니다!
개요
상세 작업 내용
작업 결과물