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.
❗ 배경
🔧 작업 내역
📝 리뷰 노트
여정 기록 로직 개선
JourneyRepository
쪽에 기록중인 여정을 가져와 사용하는 로직과LocalRecordingManager
의 로직이 중복되어 있고,여러 부분에서 혼합되어 사용되고 있는 것을 발견해서 개선해주었습니다.
UserDefaults를 통해 관리되고 있던
isRecording
과recordingJourneyID
값을LocalRecordingManager
에 포함시켜 주었습니다.그 후
Manager
보다는Storage
이 성격이 더 강해진 것 같아RecordingJourneyStorage
로 이름을 바꿔주었습니다.로컬에 진행중인 여정을 기록 / 읽기 / 삭제 하는 로직을 모두
RecordingJourneyStorage
에 옮겨주어 파편화를 해결해주었습니다.또한 앱 종료 후 다시 시작 시 이전 데이터가 있다면 이어서 기록하는 방식을 구현하기 위해
기존의
static
방식에서FileManager
를 사용하는 방식으로 교체해주었습니다.그 과정에서
FileManager
사용 중 sub-directory를 사용하는 방식에 대한 필요성이 느껴져서각 메서드에
subpath
인자를 추가해주고 하위 디렉토리에서 작업 가능한 기능을 추가해주었습니다.기록중인 여정은
ID
값을 사용하는 디렉토리를 생성하고, 그 하위에Coordinate
,Spot
,Timestamp
파일을 각각 만들어 관리합니다.SaveSpot 네비게이션 버그 수정
Cooridnator 리팩토링 작업 중 누락되었던 SaveSpot 쪽
dismiss
로직을 수정했습니다.present
되어있던SaveSpot
뷰컨을dismiss
시킨 후, completion handler를 통해finish
메서드를 실행해주었습니다.