Skip to content

Commit

Permalink
[Fix/#114] DsKit Font 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-seonwoo committed Nov 25, 2024
1 parent 7544a8c commit 6758b33
Show file tree
Hide file tree
Showing 11 changed files with 267 additions and 721 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class PickerCoordinator: NSObject, UIPickerViewDelegate, UIPickerViewDataSource

func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
selectedTime.wrappedValue = times[row]
viewModel.isCompleted = true
// viewModel.isCompleted = true
}

func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ public protocol OnboardingUseCaseType {
userName: String,
averageUseTime: String,
problems: [String],
period: Int
period: Int,
goalTime: Int
) -> AnyPublisher<Void, Error>
func calculateGoalTime(hour: String, minute: String) -> Int
func removeLastCharacterAndConvertToInt(from string: String) -> Int?
}

public final class OnboardingUseCase: OnboardingUseCaseType {

private let repository: AuthRepositoryType

public init(repository: AuthRepositoryType) {
Expand All @@ -35,9 +38,10 @@ public final class OnboardingUseCase: OnboardingUseCaseType {
userName: String,
averageUseTime: String,
problems: [String],
period: Int
period: Int,
goalTime: Int
) -> AnyPublisher<Void, Error> {
let challengeInfo = ChallengeInfo(period: period, goalTime: 0, apps: [])
let challengeInfo = ChallengeInfo(period: period, goalTime: goalTime, apps: [])

return repository.signUp(
socialPlatform: socialPlatform,
Expand All @@ -56,5 +60,24 @@ public final class OnboardingUseCase: OnboardingUseCaseType {
}
.eraseToAnyPublisher()
}

public func calculateGoalTime(hour: String, minute: String) -> Int {
let hourInt = Int(hour) ?? 0
let minuteInt = Int(minute) ?? 0

let totalMinutes = hourInt * 60 + minuteInt
let totalMilliseconds = totalMinutes * 60 * 1000
return totalMilliseconds
}

public func removeLastCharacterAndConvertToInt(from string: String) -> Int? {
guard !string.isEmpty else {
return nil
}

let modifiedString = String(string.dropLast())

return Int(modifiedString)
}
}

This file was deleted.

Loading

0 comments on commit 6758b33

Please sign in to comment.