diff LazyBearWatchOS Extension/Views/Home/HomeView.swift @ 453:37c13ebda381

Improve hierarchy and minor bugs fixed
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Sun, 27 Jun 2021 14:18:29 +0200
parents bb69f9d1d20f
children c79a3ed3d230
line wrap: on
line diff
--- a/LazyBearWatchOS Extension/Views/Home/HomeView.swift	Sat Jun 26 18:45:31 2021 +0200
+++ b/LazyBearWatchOS Extension/Views/Home/HomeView.swift	Sun Jun 27 14:18:29 2021 +0200
@@ -11,8 +11,7 @@
 struct HomeView: View {
     @ObservedObject var profile = Profile()
 
-    @FetchRequest(entity: WatchlistCompany.entity(), sortDescriptors: [])
-    var watchlistCompanies: FetchedResults<WatchlistCompany>
+    @FetchRequest(entity: WatchlistCompany.entity(), sortDescriptors: []) var watchlistCompanies: FetchedResults<WatchlistCompany>
     
     @State private var timer = Timer.publish(every: 10, on: .main, in: .common).autoconnect()  /// Set recurrent price request
     
@@ -49,6 +48,7 @@
         switch requestType {
         case .initial:
             let url = "https://api.lazybear.app/profile/type=initial/symbols=\(symbolsString)"
+            print(watchlistCompanies)
             profile.request(url, .initial)
             
         default: