-
Notifications
You must be signed in to change notification settings - Fork 2
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
SettingsUseCase 및 ChangeUserNameUseCase 작성 #129
Conversation
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.
싹 분리돼서 깔끔해져서, 꽤나 놀랐습니다.
|
||
final class SettingsRepositoryImpl: SettingsRepository { | ||
|
||
} |
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.
구조 바꾼 대로 잘 반영해 주셨군요, 좋습니다.
func getAutoPlayMode() -> Bool | ||
func changeAutoPlayMode(to mode: Bool) | ||
func getDarkMode() -> Int | ||
func changeDarkMode(to mode: Int) |
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.
처음엔 change to dark mode여야 하지 않나 했습니다만, 생각해 보니 두 가지가 아닌 세 가지의 상태가 있었죠. 문제없어보입니다.
return "항상 어둡게" | ||
} | ||
} | ||
} |
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.
분리되어 있으니 깔끔하네요!
.settingsSwitch(title: "음악 자동 재생", isOn: true), // TODO: isOn은 로컬 디비로부터 불러와야 합니다. | ||
.settingsActionSheet(title: "다크 모드") | ||
.settingsSwitch(title: "음악 자동 재생", isOn: settingsUseCase.getAutoPlayMode()), | ||
.settingsActionSheet(title: "다크 모드", mode: settingsUseCase.getDarkMode()) |
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.
데이터 소스의 해법을 이렇게 찾으셨군요..! 어쩌면 이것이 PublishSubject보다 좋을지도 모르겠습니다.
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.
debugPrint()를 통하여 전체적으로 프린트 찍어보면서 잘 동작하는지 확인하는 모습 좋습니다 :)
경민님께서 달아주신대로 잘 분리되어 있어서 더더욱 읽기 편하였습니다!
수고하셨습니다!
11/30 #125 #126 #127 #128
작업한 내용
SettingsUseCase와 ChangeUserNameUseCase를 작성했습니다.
SettingsUseCase에서 LocalUtilityRepository 메서드를 이용합니다.
getAutoPlayMode()
,getDarkMode()
메서드를 이용해 지정하여 뷰에 처음 진입했을 때 저장되어 있는 값이 불러와지도록 합니다.