Skip to content

Commit 90596c4

Browse files
author
Ipsky
committed
com
1 parent e330e30 commit 90596c4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

LineGraph/RunningEntryView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ import Combine
1313
fileprivate let interval = TimeInterval(10)
1414

1515
struct RunningEntryView: View {
16+
1617
@EnvironmentObject var cred: Credentials
1718
@EnvironmentObject var model: GraphModel
1819
@Environment(\.managedObjectContext) var moc
20+
1921
@FetchRequest(entity: Project.entity(), sortDescriptors: []) var projects: FetchedResults<Project>
2022

23+
/// manage the auto updating
2124
let timer = Timer.publish(every: interval, on: .main, in: .common).autoconnect()
2225
@State var running: RunningEntry? = nil
2326
@State var cancellable: AnyCancellable? = nil
@@ -58,6 +61,9 @@ struct RunningEntryView: View {
5861

5962
func loadRunning() -> Void {
6063
guard let user = cred.user else { return }
64+
#if DEBUG
65+
print("Fetching running timer")
66+
#endif
6167
cancellable = RunningEntryLoader().fetchRunningEntry(
6268
user: user,
6369
projects: Array(projects),

0 commit comments

Comments
 (0)