Skip to content

Commit

Permalink
feat: onProfileImageEditComplete 브릿지 호출 시 유저 정보 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
leemhyungyu committed Nov 5, 2024
1 parent c0730c6 commit d489b55
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ extension EditProfileFeature {
case .backButtonDidTapped:
return .send(.delegate(.closeEditProfileView))

case .profileImageDidChanged:
return .send(.delegate(.profileImageDidChanged))

default:
return .none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ public struct EditProfileFeature {
case presentToast(message: String)
case backButtonDidTapped
case delegate(Delegate)
case profileImageDidChanged

public enum Delegate {
case closeEditProfileView
case profileImageDidChanged
}

// binding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public struct ProfileEditView: View {
case .closeWebView:
store.send(.backButtonDidTapped)

case .profileImageDidChanged:
store.send(.profileImageDidChanged)

default:
Log.assertion(message: "\(action) - not handled action")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ extension MyPageRootFeature {
case .closeEditProfileView:
_ = state.path.popLast()
return .none
case .profileImageDidChanged:
return .send(.myPage(.userProfileUpdateDidRequest))
}

default:
Expand Down

0 comments on commit d489b55

Please sign in to comment.