Mercurial > public > lazybear
comparison LazyBear/Views/Home/HomeView.swift @ 401:f843c6382529
Add Enumeration to Networks files
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Thu, 20 May 2021 21:04:49 +0200 |
parents | 5c99883c7964 |
children | 5f21f7c23c5e |
comparison
equal
deleted
inserted
replaced
400:6055a867d2b6 | 401:f843c6382529 |
---|---|
49 CurrencyRow(latestCurrencies: latestCurrencies) | 49 CurrencyRow(latestCurrencies: latestCurrencies) |
50 .listRowInsets(EdgeInsets()) | 50 .listRowInsets(EdgeInsets()) |
51 } | 51 } |
52 } | 52 } |
53 .onAppear { self.timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect() } // Start timer | 53 .onAppear { self.timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect() } // Start timer |
54 .onReceive(timer) { _ in home.request("https://api.lazybear.app/home/type=streaming", isInitRequest: false) } // Receive timer notification | 54 .onReceive(timer) { _ in home.request("https://api.lazybear.app/home/type=streaming", .streaming) } // Receive timer notification |
55 .onDisappear { self.timer.upstream.connect().cancel() } // Stop timer | 55 .onDisappear { self.timer.upstream.connect().cancel() } // Stop timer |
56 .navigationTitle("\(dueDate, formatter: Self.taskDateFormat)") | 56 .navigationTitle("\(dueDate, formatter: Self.taskDateFormat)") |
57 .navigationBarTitleDisplayMode(.inline) | 57 .navigationBarTitleDisplayMode(.inline) |
58 .navigationViewStyle(StackNavigationViewStyle()) | 58 .navigationViewStyle(StackNavigationViewStyle()) |
59 .toolbar { | 59 .toolbar { |
70 } | 70 } |
71 } | 71 } |
72 } else { | 72 } else { |
73 ProgressView() | 73 ProgressView() |
74 .onAppear { | 74 .onAppear { |
75 home.request("https://api.lazybear.app/home/type=init", isInitRequest: true) | 75 home.request("https://api.lazybear.app/home/type=init", .initial) |
76 } | 76 } |
77 | 77 |
78 } | 78 } |
79 } | 79 } |
80 } | 80 } |