Mercurial > public > lazybear
changeset 95:a2ed7369be9f
Temporary deactivate timer
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Fri, 29 Jan 2021 20:42:43 +0100 |
parents | fe26349780c8 |
children | 7f395c0c8d6e |
files | LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate lazybear/Views/Price.swift |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
Binary file LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed
--- a/lazybear/Views/Price.swift Fri Jan 29 20:37:20 2021 +0100 +++ b/lazybear/Views/Price.swift Fri Jan 29 20:42:43 2021 +0100 @@ -18,7 +18,7 @@ @State var changePercent = Double() { didSet { self.showingView = true }} let iexApi = IexApi() // Request api function - //let timer = Timer.publish(every: 5, on: .main, in: .common).autoconnect() // Set recurrent price request + let timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect() // Set recurrent price request @EnvironmentObject var apiAccess: ApiAccess @@ -26,9 +26,9 @@ VStack { if self.showingView { Text("\(latestPrice, specifier: "%.2f")") + //.onReceive(timer) { _ in giveMePrices() } } } - //.onReceive(timer) { _ in giveMePrices() } .onAppear { getUrl() } }