Mercurial > public > lazybear
comparison LazyBear/Views/Home/Helpers/StockRow.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 | 8c58ce834d95 |
children | ffbb1dbab531 |
comparison
equal
deleted
inserted
replaced
431:871c10220a3d | 432:3ca32ff79630 |
---|---|
9 | 9 |
10 | 10 |
11 struct StockRow: View { | 11 struct StockRow: View { |
12 var listName: String | 12 var listName: String |
13 var companies: [CompanyModel] | 13 var companies: [CompanyModel] |
14 var showWatchlistSheet: Bool? | |
15 | 14 |
16 @State private var showList = false | 15 @State private var showList = false |
17 @Environment(\.managedObjectContext) private var moc | 16 @Environment(\.managedObjectContext) private var moc |
18 | 17 |
19 var body: some View { | 18 var body: some View { |
47 } | 46 } |
48 .frame(height: 250) | 47 .frame(height: 250) |
49 } | 48 } |
50 .padding(.bottom) | 49 .padding(.bottom) |
51 .sheet(isPresented: $showList) { | 50 .sheet(isPresented: $showList) { |
52 if showWatchlistSheet ?? false { | 51 StockSheet(listName: adaptListTitle(listName), companies: companies) |
53 WatchlistSheet(listName: listName, apiCompanies: companies) | |
54 .environment(\.managedObjectContext, self.moc) | |
55 } else { | |
56 StockSheet(listName: adaptListTitle(listName), companies: companies) | |
57 } | |
58 } | 52 } |
59 } | 53 } |
60 | 54 |
61 /* | 55 /* |
62 Get list keys (mostactive, losers, active) and adapt them to diplay | 56 Get list keys (mostactive, losers, active) and adapt them to diplay |