diff LazyBear/Views/Profile/Helpers/WatchlistCreatorRow.swift @ 430:c78d5b5b3bda

Minor updates
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 19 Jun 2021 16:21:26 +0200
parents 0a4c399170c4
children c6913f0ce46e
line wrap: on
line diff
--- a/LazyBear/Views/Profile/Helpers/WatchlistCreatorRow.swift	Sat Jun 19 16:20:58 2021 +0200
+++ b/LazyBear/Views/Profile/Helpers/WatchlistCreatorRow.swift	Sat Jun 19 16:21:26 2021 +0200
@@ -9,7 +9,7 @@
 
 struct WatchlistCreatorRow: View {
     var company: SearchResponse
-    @Binding var presentationMode: PresentationMode
+    @Binding var watchlistCreatorListPresentation: PresentationMode
     @ObservedObject var watchlistCreatorClass: WatchlistCreatorClass
     
     var body: some View {
@@ -41,7 +41,7 @@
      */
     private func saveCompany() {
         watchlistCreatorClass.companies.append(company)
-        $presentationMode.wrappedValue.dismiss()
+        $watchlistCreatorListPresentation.wrappedValue.dismiss()
     }
 }
 
@@ -49,6 +49,6 @@
     @Environment(\.presentationMode) static var presentationMode
     
     static var previews: some View {
-        WatchlistCreatorRow(company: SearchResponse(currency: "USD", exchange: nil, region: "US", securityName: "Apple Inc", symbol: "AAPL"), presentationMode: presentationMode, watchlistCreatorClass: WatchlistCreatorClass())
+        WatchlistCreatorRow(company: SearchResponse(currency: "USD", exchange: nil, region: "US", securityName: "Apple Inc", symbol: "AAPL"), watchlistCreatorListPresentation: presentationMode, watchlistCreatorClass: WatchlistCreatorClass())
     }
 }