diff LazyBear/Views/Profile/Helpers/WatchlistCreatorList.swift @ 394:4c90e5b18632

Fixes #46
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Fri, 07 May 2021 11:00:53 +0200
parents 0a4c399170c4
children 444ec927d62f
line wrap: on
line diff
--- a/LazyBear/Views/Profile/Helpers/WatchlistCreatorList.swift	Sun May 02 12:41:20 2021 +0200
+++ b/LazyBear/Views/Profile/Helpers/WatchlistCreatorList.swift	Fri May 07 11:00:53 2021 +0200
@@ -13,6 +13,7 @@
     @State private var companies = [SearchResponse]()
     
     @Environment(\.presentationMode) private var presentationMode
+    @Environment(\.managedObjectContext) private var moc
     
     var body: some View {
         NavigationView {
@@ -21,6 +22,7 @@
                 
                 List(companies, id: \.self) { company in
                     WatchlistCreatorRow(company: company, presentationMode: presentationMode, watchlistCreatorClass: watchlistCreatorClass)
+                        .environment(\.managedObjectContext, self.moc)
                 }
             }
             .navigationTitle("Search")