Skip to content
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

[Fix] #223 - 다이얼로그 '허용' 선택 후 토글 오류 수정 #224

Merged
merged 8 commits into from
Jan 29, 2024

Conversation

yungu0010
Copy link
Member

@yungu0010 yungu0010 commented Jan 18, 2024

🫧 작업한 내용

  • 다이얼로그 '허용' 선택 후 토글 오류를 수정했습니다.
  • 알림 설정 변경 시 앰플리튜드 이벤트에 올바른 값이 전달되지 않는 오류를 수정했습니다.
  • 더 이상 상속받지 않는 class들에 final 키워드를 붙여주었습니다.

🔫 PR Point

  • 토글 오류를 수정하며 UserDefault에 getBool(_ key: String)를 만들어보았습니다. 이렇게 하면 가독성이 더 좋을 것 같아서요!
private var isNotificationAllowed: Bool {
        return KeychainUtil.getBool(DefaultKeys.isNotificationAccepted)
}

또한 기존에 UserDefault.standard.bool로 접근하던 것을 모두 해당 함수로 변경했습니다. 공통 알림 모달 구현에도 같은 로직이 사용되는데 getBool로 바꾸시는거 어떠신가요?_?

📸 스크린샷

구현 내용 스크린샷
토글 오류 수정

📮 관련 이슈

@yungu0010 yungu0010 added this to the SP6 milestone Jan 18, 2024
@yungu0010 yungu0010 self-assigned this Jan 18, 2024
Copy link
Member

@hyesuuou hyesuuou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습미당~

@@ -45,13 +45,15 @@ public final class KeychainUtil {
static func getAppleEmail() -> String {
UserDefaults.standard.string(forKey: DefaultKeys.appleEmail) ?? "연동된 이메일 정보가 없습니다"
}

static func getBool(_ key: String) -> Bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

프로퍼티가 추가되면 계속 함수가 추가되는 구조라 제네릭을 이용한 Keychain 관련 Util을 만들어봐도 좋을것 같아요 ㅎ.ㅎ
나중에 시간나면 같이 만들어봐여,,

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 좋습니다!! 이번 리팩 때 이 부분도 수정해보아요 , ,

Copy link
Member

@jeongdung-eo jeongdung-eo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

놓치고 있었던 final,,, ㅎㅎㅎ 감사함돵 >< 🍎

@yungu0010 yungu0010 merged commit 50fe52f into develop Jan 29, 2024
1 check passed
@yungu0010 yungu0010 deleted the feature/#223 branch January 29, 2024 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix] 다이얼로그 '허용' 선택 후 토글 오류 수정
3 participants