comparison LazyBear/Views/Home/HomeView.swift @ 453:37c13ebda381

Improve hierarchy and minor bugs fixed
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Sun, 27 Jun 2021 14:18:29 +0200
parents 4255f94d0767
children
comparison
equal deleted inserted replaced
452:bb69f9d1d20f 453:37c13ebda381
49 .onDisappear { self.timer.upstream.connect().cancel() } // Stop timer 49 .onDisappear { self.timer.upstream.connect().cancel() } // Stop timer
50 .navigationTitle("\(dueDate, formatter: Self.taskDateFormat)") 50 .navigationTitle("\(dueDate, formatter: Self.taskDateFormat)")
51 .toolbar { 51 .toolbar {
52 ToolbarItem(placement: .navigationBarTrailing) { 52 ToolbarItem(placement: .navigationBarTrailing) {
53 Button(action: { showTradingDates = true }) { 53 Button(action: { showTradingDates = true }) {
54 Image(systemName: "calendar.badge.clock") 54 Image(systemName: "clock")
55 } 55 }
56 } 56 }
57 } 57 }
58 } 58 }
59 .background(Color("customBackground").edgesIgnoringSafeArea(.all)) 59 .background(Color("customBackground").edgesIgnoringSafeArea(.all))
64 TradingDatesSheet(dates: dates) 64 TradingDatesSheet(dates: dates)
65 } 65 }
66 } 66 }
67 } else { 67 } else {
68 ProgressView() 68 ProgressView()
69 .onAppear { 69 .onAppear { home.request("https://api.lazybear.app/home/type=initial", .initial) }
70 home.request("https://api.lazybear.app/home/type=initial", .initial)
71
72 }
73
74 } 70 }
75 } 71 }
76 } 72 }
77 73
78 struct HomeView_Previews: PreviewProvider { 74 struct HomeView_Previews: PreviewProvider {