Mercurial > public > lazybear
diff LazyBear/Views/Global Helpers/StockRow.swift @ 379:a7e2c5a7b4f6
Implement onDelete in watchlists
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Thu, 22 Apr 2021 23:44:20 +0200 |
parents | f3cb5bdea8e5 |
children | 79c39987aaa4 |
line wrap: on
line diff
--- a/LazyBear/Views/Global Helpers/StockRow.swift Wed Apr 21 23:12:56 2021 +0200 +++ b/LazyBear/Views/Global Helpers/StockRow.swift Thu Apr 22 23:44:20 2021 +0200 @@ -12,6 +12,7 @@ var listName: String var list: [String: QuoteModel] var intradayPrices: [String: [IntradayPriceModel]]? + var addOnDelete: Bool @State private var showExtensiveList = false @@ -48,7 +49,7 @@ } .padding(.bottom) .sheet(isPresented: $showExtensiveList) { - ExtensiveList(listName: listName, list: list, intradayPrices: intradayPrices, latestCurrencies: nil) + ExtensiveList(listName: listName, list: list, intradayPrices: intradayPrices, latestCurrencies: nil, addOnDelete: addOnDelete) } } } @@ -59,7 +60,7 @@ StockRow( listName: "Gainers", list: ["AAPL": QuoteModel(changePercent: 0.03, companyName: "Apple Inc", latestPrice: 130.3)], - intradayPrices: ["AAPL": [IntradayPriceModel(open: 130.2)]] + intradayPrices: ["AAPL": [IntradayPriceModel(open: 130.2)]], addOnDelete: false ) } }