comparison LazyBear/Views/Company/Chart.swift @ 407:c804ce7a1560

Implementing Insider networking
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sun, 06 Jun 2021 13:11:41 +0200
parents fd8df65927e9
children dc8dccd18e86
comparison
equal deleted inserted replaced
406:09d05e48462f 407:c804ce7a1560
58 } 58 }
59 } 59 }
60 ) 60 )
61 61
62 if let latestNews = company.chartData.latestNews { 62 if let latestNews = company.chartData.latestNews {
63 ForEach(latestNews, id: \.self) { new in 63 VStack(spacing: 20) {
64 NewsRow(new: new) 64 ForEach(latestNews, id: \.self) { new in
65 NewsRow(new: new)
66 }
65 } 67 }
68 .padding(.top)
66 } 69 }
67 } 70 }
68 .onAppear { self.timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect() } // Start timer 71 .onAppear { self.timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect() } // Start timer
69 .onDisappear { self.timer.upstream.connect().cancel() } // Stop timer 72 .onDisappear { self.timer.upstream.connect().cancel() } // Stop timer
70 .onReceive(timer) { _ in 73 .onReceive(timer) { _ in