File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,14 @@ import Combine
1313fileprivate let interval = TimeInterval ( 10 )
1414
1515struct 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) ,
You can’t perform that action at this time.
0 commit comments