Skip to content

Commit

Permalink
✅[CHORE] 수영한 경우가 없을 때 처리 부분 수정 (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
hryeong66 committed Jan 17, 2022
1 parent 624b1d9 commit 26b88e5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Umpah-iOS/Umpah-iOS/Source/Service/SwimmingDataStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,13 @@ class SwimmingDataStorage{
swimmingWorkoutList.append(swimming)
swimming.display()
}
UserDefaults.standard.set(swimmingWorkoutList[swimmingWorkoutList.count - 1].endDate,
forKey: "lastestWorkoutDate")
print()

if swimmingWorkoutList.isEmpty {
print("수영데이터가 없는 사용자입니다.")
}else{
UserDefaults.standard.set(swimmingWorkoutList[swimmingWorkoutList.count - 1].endDate,
forKey: "lastestWorkoutDate")
}
print("마지막 날짜 설정 \(UserDefaults.standard.string(forKey: "lastestWorkoutDate"))")
completion(swimmingWorkoutList, nil)
}
Expand Down

0 comments on commit 26b88e5

Please sign in to comment.