[HotFix] DiaryHomeViewController 돌아올 시 crash 해결 #30
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.
🔥 트러블 슈팅
Diary 생성 시 crash error
DiaryHomeViewController에서 ViewWillAppear 할 때마다 일기 list를 비우지도 않고 새로 list를 받아와 추가하면서 문제가 생겼다. DiaryList가 비어 있는 경우에만 추가하도록 수정하였고, 그 외에 작업들에서 list를 다시 부르고 싶으면 diaryList를 비우는 방식으로 변경하였다.
삭제하는 경우에는 이 방법이 부자연스러워서, 추후 해당 일기만 찾아서 list에서 제거하는 방법으로 변경할 예정이다.