-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 로그인 에러 토스트 구현, LoginViewModel 메서드 분리 및 코드 리팩토링 #254
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
Conversation
WalkthroughThis update refactors error handling and dependency injection in the login and profile flows. It introduces a dedicated error publisher in the login view model, allowing the login view controller to present a toast when login errors occur. Use case and repository instantiations are streamlined, and method names are updated for clarity. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant LoginViewController
participant LoginViewModel
User->>LoginViewController: Triggers login (Kakao/Apple)
LoginViewController->>LoginViewModel: Input event
LoginViewModel->>LoginViewModel: fetchUserAuth(platform)
alt Auth error
LoginViewModel->>LoginViewModel: Send error to loginErrorSubject
LoginViewModel-->>LoginViewController: Output.error emits error
LoginViewController->>LoginViewController: Present toast with error message
else Auth success
LoginViewModel->>LoginViewModel: updateFCMToken
LoginViewModel->>LoginViewModel: updateUserProfile
LoginViewModel-->>LoginViewController: Output.success
end
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (13)
🧰 Additional context used🧬 Code Graph Analysis (4)Wable-iOS/Presentation/Onboarding/ViewController/AgreementViewController.swift (1)
Wable-iOS/Domain/UseCase/Onboarding/UpdateFCMTokenUseCase.swift (1)
Wable-iOS/Presentation/Login/LoginViewController.swift (2)
Wable-iOS/Presentation/Profile/Edit/ProfileEditViewController.swift (1)
🔇 Additional comments (27)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
JinUng41
left a comment
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.
고생하셨습니다! 👍🏼
[Feat] 로그인 에러 토스트 구현, LoginViewModel 메서드 분리 및 코드 리팩토링
👻 PULL REQUEST
📄 작업 내용
UserDefaultsStorage의 생성자에서JSONEncoder,JSONDecoder를 선택적으로 명시할 수 있도록 리팩토링을 진행했어요.LoginViewModel에서 기능별 메서드 분리를 진행했어요.WableError의 카카오, 애플 로그인 관련case의 네이밍과description을 수정했어요.💻 주요 코드 설명
UserProfileUseCase 메서드 수정
👀 기타 더 이야기해볼 점
🔗 연결된 이슈
Summary by CodeRabbit
New Features
Bug Fixes
Refactor