[2023.06.13.정호섭] SSO-Login 기능 구현#7
Open
thsamajiki wants to merge 9 commits into
Open
Conversation
Collaborator
|
질문 및 건의사항이 있습니다!
|
kailloop
reviewed
Jun 14, 2023
kailloop
requested changes
Jun 14, 2023
Collaborator
kailloop
left a comment
There was a problem hiding this comment.
MainActivity의 getIntent 메소드 추가
getIntent(context: Context) = Intent(context, MainActivity::class.java) 해당 코드는 왜 쓰신걸까용..?
Collaborator
Author
|
kailloop
reviewed
Jun 15, 2023
Collaborator
There was a problem hiding this comment.
팩토리 패턴에 대한 추가 질의사항이 있습니다!
- 팩토리 패턴 사용 이유가 수정 사항에 대한 제한을 열린 확장성을 가진 OCP 원칙을 지키기 위해서인데 해당 사항은 팩토리 패턴이라기 보다는 Singleton 패턴의 장점을 살리기위해 작성하신걸로 보입니다! 일단 의도는 그래 보여서 혹시 제가 아는 팩토리 패턴이랑 다른 것 같아 조심스레 여쭤봅니다..!
- 해당 메소드를 보시면 함수를 실행 시킬 때 마다 new Intent()를 생성해서 return 해주는 방식으로 저는 보입니다..! 그래서, 차라리
companion object { val mainIntent : Intent? = null fun getIntent(): Intent { return if (mainIntent != null) mainIntent else mainIntent = Intent(this, MainActivity:class) } }
해당 코드로 바뀌는게 좋지 않을까요?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Kakao, Google 로그인 기능 구현했습니다.