Skip to content

Commit

Permalink
Merge pull request #310 from boostcampwm2023/iOS/task/UserStart-Fix
Browse files Browse the repository at this point in the history
[iOS] μ‹œμž‘μ΄ λ˜μ§€ μ•ŠλŠ” ν˜„μƒ μˆ˜μ •
  • Loading branch information
SwiftyJunnos authored Dec 13, 2023
2 parents 1ffe0f6 + 493d5de commit 13915a3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ public final class HomeViewModel {

private extension HomeViewModel {

private var shouldSignIn: Bool {
return self.isFirstLaunch || self.userRepository.fetchUUID() == nil
}

func createNewUserWhenFirstLaunch() {
guard self.isFirstLaunch else { return }
guard self.shouldSignIn else { return }

Task {
let result = await self.userRepository.createUser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,7 @@ public final class MapViewController: UIViewController {
CLLocationCoordinate2D(latitude: $0.latitude,
longitude: $0.longitude)
}
let spotCoordinates = journey.spots.map {
CLLocationCoordinate2D(latitude: $0.coordinate.latitude,
longitude: $0.coordinate.longitude)
}
await self.drawPolylineToMap(using: coordinates+spotCoordinates)
await self.drawPolylineToMap(using: coordinates)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension MSKeychainStorage {

public enum Accounts: String, CaseIterable {

case userID
case userID = "MusicSpotUser.v1"

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import UIKit

import MSDesignSystem
import MSExtension
import MSImageFetcher

public final class JourneyCell: UICollectionViewCell {
Expand Down Expand Up @@ -96,8 +97,7 @@ public final class JourneyCell: UICollectionViewCell {
return
}

let key = "\(indexPath.section)-\(indexPath.item)"
photoView.imageView.ms.setImage(with: imageURL, forKey: key)
photoView.imageView.ms.setImage(with: imageURL, forKey: imageURL.paath())
}

}
Expand Down
18 changes: 9 additions & 9 deletions iOS/MusicSpot/MusicSpot/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ import MSKeychainStorage
private extension SceneDelegate {

func prepareToDebug() {
// self.isFirstLaunch = true
// self.recordingJourneyID = nil
// self.isRecording = false
//
// do {
// try self.keychain.deleteAll()
// } catch {
// MSLogger.make(category: .keychain).error("킀체인 μ΄ˆκΈ°ν™” μ‹€νŒ¨")
// }
self.isFirstLaunch = true
self.recordingJourneyID = nil
self.isRecording = false

do {
try self.keychain.deleteAll()
} catch {
MSLogger.make(category: .keychain).error("킀체인 μ΄ˆκΈ°ν™” μ‹€νŒ¨")
}
}

}
Expand Down

0 comments on commit 13915a3

Please sign in to comment.