Mercurial > public > lazybear
changeset 285:7252f5e62c90
Delete comments
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Fri, 19 Mar 2021 23:03:48 +0100 |
parents | 9c4ec55708f7 |
children | c1f9ccb421d4 |
files | LazyBear/UI/CompanyRow.swift LazyBear/UI/CompanyView.swift |
diffstat | 2 files changed, 15 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/LazyBear/UI/CompanyRow.swift Fri Mar 19 23:03:43 2021 +0100 +++ b/LazyBear/UI/CompanyRow.swift Fri Mar 19 23:03:48 2021 +0100 @@ -12,7 +12,6 @@ var name: String var rowNumber: Int var showPrice: Bool -// @Environment(\.editMode) var mode var body: some View { HStack { @@ -30,11 +29,6 @@ PriceView(symbol: symbol, showVertical: true) } } - -// if self.mode?.wrappedValue.isEditing ?? true { -// return PriceView(symbol: symbol) -// } - } }
--- a/LazyBear/UI/CompanyView.swift Fri Mar 19 23:03:43 2021 +0100 +++ b/LazyBear/UI/CompanyView.swift Fri Mar 19 23:03:48 2021 +0100 @@ -15,6 +15,7 @@ var name: String var symbol: String let haptics = Haptics() + @State private var scale: CGFloat = 1 @EnvironmentObject var hudManager: HudManager @EnvironmentObject var companyOption: CompanyOption @Environment(\.managedObjectContext) private var moc @@ -22,23 +23,21 @@ var body: some View { ScrollView { - //VStack { - if companyOption.view == .stock { - PriceView(symbol: symbol, showVertical: false) - ChartView(symbol: symbol) - KeyStatsView(symbol: symbol) - NewsView(symbol: symbol) - - } else if companyOption.view == .insiders { - InsiderSummary(symbol: symbol) - InsiderTransactions(symbol: symbol) - } - //} + if companyOption.view == .stock { + PriceView(symbol: symbol, showVertical: false) + ChartView(symbol: symbol) + KeyStatsView(symbol: symbol) + NewsView(symbol: symbol) + + } else if companyOption.view == .insiders { + InsiderSummary(symbol: symbol) + InsiderTransactions(symbol: symbol) + } } .onAppear { companyOption.view = .stock } .toolbar { ToolbarItem(placement: .principal) { - Button(action: { self.hudManager.showAction.toggle(); haptics.simpleSuccess() }) { + Button(action: { self.hudManager.showAction.toggle(); haptics.simpleSuccess()}) { HStack { if companyOption.view == .stock { Text("Stock") @@ -56,6 +55,9 @@ Button(action: { addCompany() }) { Image(systemName: "star") } + .scaleEffect(scale) + .animation(.easeIn) + } else { Button(action: { removeCompany() }) { Image(systemName: "star.fill")