-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix] EventMonitor의 저장 프로퍼티 관련 경고 해결 #107
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
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.
고생하셨습니다~
OAuthErrorMonitor가 앱 내에서 하나만 존재해여 한다면, 싱글톤 패턴을 사용해야 할까 하는 고민이 생겼습니다.
| var isUnauthorized: Bool { | ||
| get { | ||
| queue.sync { condition } | ||
| queue.sync { OAuthErrorMonitor.condition } |
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.
Self.condition도 가능하답니다~
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.
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.
저는 대문자 Self.condition을 말한거긴 한데, 혹시 이것도 적용이 안되나요?
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.
오마이갓 클래스 단위는 Self로 참조가 가능하군요 ... 바로 적용했습니다 감사합니닷
[Fix] EventMonitor의 저장 프로퍼티 관련 경고 해결

👻 PULL REQUEST
📄 작업 내용
OAuthErrorMonitor구현 시 선언한 저장 프로퍼티로 인해 발생한 경고를 해결했어요.💻 주요 코드 설명
EventMonitor의condition속성 변경condition을 정적 프로퍼티로 변경했습니다.OAuthErrorMonitor인스턴스가 있는 경우 모두 동일한 상태를 공유하고 한 인스턴스에서 인증 실패를 감지하면 모든 인스턴스에 영향을 미칠 수 있다는 단점이 있는데요.OAuthErrorMonitor는 결국 앱에서 하나의 인스턴스만 선언되어야 하기 때문에 변경 가능하다는 결론을 내렸습니다.👀 기타 더 이야기해볼 점
🔗 연결된 이슈