Skip to content

Commit

Permalink
[Feat/#75] 전체 사용 목표 시간 범위 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe0929 committed Jul 31, 2024
1 parent a86351c commit 1531c73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ class HomeViewModel: ObservableObject {
var usageGrade = ""

@AppStorage("handleUsage") var isNotHandleUsage: Bool = true
@StateObject var screenTimeVM = ScreenTimeViewModel()
@ObservedObject var screenTimeVM = ScreenTimeViewModel()

init(){ }

func getDailyChallenge() {
Providers.challengeProvider.request(target: .getdailyChallenge, instance: BaseResponse<HomeChallengeResponseDTO>.self) { result in
if let data = result.data {
self.totalGoalTimeDouble = data.goalTime
self.screenTimeVM.handleTotalDeviceActivityMonitoring(interval: self.totalGoalTimeDouble/60000)
if self.isNotHandleUsage {
self.screenTimeVM.handleStartDeviceActivityMonitoring(interval: self.appGoalTimeDouble)
self.screenTimeVM.handleTotalDeviceActivityMonitoring(interval: self.totalGoalTimeDouble/60000)
self.isNotHandleUsage = false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import SwiftUI

struct AppGoalTimeView: View {
var timesHour = Array(0...1).map { String($0) }
var timesHour = Array(0...5).map { String($0) }
var timesMinute = Array(0...59).map { String($0) }
@ObservedObject var viewModel: OnboardingViewModel

Expand Down

0 comments on commit 1531c73

Please sign in to comment.