-
Notifications
You must be signed in to change notification settings - Fork 0
[#288] TodoEditorView에서 Todo의 완료 여부를 토글할 수 있는 UI를 구현한다 #296
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
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.
makeTodo()메서드에서completedAt을 결정하는 로직에 버그가 있습니다.현재 로직은 할 일을 '완료' 상태로 저장할 때, 이전에 완료된 적이 있었다면 원래의 완료 시간을 그대로 사용합니다 (
self.completedAt). 이로 인해 다음과 같은 엣지 케이스에서 의도치 않은 동작이 발생합니다.completedAt이 T2가 아닌 T1으로 저장됩니다.재완료 시에는 완료 시간이 새로고침되어야 합니다. 이 문제를 해결하려면
completedAt의 상태 관리 방식을 변경하는 것을 고려해볼 수 있습니다. 예를 들어,State구조체에completedAt을 포함시키고,setCompleted액션을 처리할 때 '미완료'에서 '완료'로 상태가 변경되는 시점을 감지하여completedAt을 현재 시간으로 업데이트하는 방식이 더 견고할 것 같습니다.