diff LazyBear/Views/Home/HomeView.swift @ 349:5ccceb527178

Implementing new internal API
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Wed, 14 Apr 2021 23:08:26 +0200
parents 80bfa88c6b0f
children eb97439e46cd
line wrap: on
line diff
--- a/LazyBear/Views/Home/HomeView.swift	Sun Apr 11 19:56:04 2021 +0200
+++ b/LazyBear/Views/Home/HomeView.swift	Wed Apr 14 23:08:26 2021 +0200
@@ -41,6 +41,11 @@
                         }
                         .listRowInsets(EdgeInsets())
                     }
+                    
+                    if let latestCurrencies = home.data.latestCurrencies {
+                        CurrencyRow(latestCurrencies: latestCurrencies)
+                            .listRowInsets(EdgeInsets())
+                    }
                 }
                 .onReceive(timer) { _ in home.request("https://api.lazybear.app/home/streaming") }
                 .onDisappear { self.timer.upstream.connect().cancel() }  // Stop timer
@@ -64,10 +69,11 @@
             ProgressView()
                 .onAppear {
                     home.request("https://api.lazybear.app/home/init")
+                    
                     // Restart timer
                     self.timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect()
                 }
-            
+
         }
     }
 }