comparison LazyBear/Views/Profile/ProfileView.swift @ 432:3ca32ff79630

Fixes RenameSheetList bug
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 19 Jun 2021 20:13:25 +0200
parents e707dbfc3115
children 5ca468751db2
comparison
equal deleted inserted replaced
431:871c10220a3d 432:3ca32ff79630
23 List { 23 List {
24 if let apiCompanies = profile.data.quotes { 24 if let apiCompanies = profile.data.quotes {
25 let watchlistsNames = Array(Set(watchlistCompanies.map { $0.watchlistName })).sorted() /// Get watchlistsNames in Core Data 25 let watchlistsNames = Array(Set(watchlistCompanies.map { $0.watchlistName })).sorted() /// Get watchlistsNames in Core Data
26 ForEach(watchlistsNames, id: \.self) { watchlistName in 26 ForEach(watchlistsNames, id: \.self) { watchlistName in
27 let companies = createWatchlistRow(apiCompanies, watchlistCompanies, watchlistName) 27 let companies = createWatchlistRow(apiCompanies, watchlistCompanies, watchlistName)
28 StockRow(listName: watchlistName, companies: companies, showWatchlistSheet: true) 28 ProfileStockRow(watchlistName: watchlistName, companies: companies)
29 } 29 }
30 .listRowInsets(EdgeInsets()) 30 .listRowInsets(EdgeInsets())
31 .onAppear { /// Request API again when Core Data changes to update the list 31 .onAppear { /// Request API again when Core Data changes to update the list
32 refreshList() 32 refreshList()
33 } 33 }