Mercurial > public > lazybear
diff LazyBear/Views/Company/CompanyView.swift @ 417:5f21f7c23c5e
Add comments and clean code
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Fri, 11 Jun 2021 11:37:42 +0200 |
parents | c804ce7a1560 |
children | 277197ce1416 |
line wrap: on
line diff
--- a/LazyBear/Views/Company/CompanyView.swift Wed Jun 09 20:26:28 2021 +0200 +++ b/LazyBear/Views/Company/CompanyView.swift Fri Jun 11 11:37:42 2021 +0200 @@ -10,11 +10,12 @@ struct CompanyView: View { var symbol: String - @ObservedObject var company = Company() @State private var showViewSelector = false - // Views + /* + Views + */ @State private var showChartView = true @State private var showInsiderView = false @@ -23,8 +24,7 @@ VStack { CompanyHeader(symbol: symbol, showViewSelector: $showViewSelector) .padding(.bottom) - - // Chart View + if showChartView { Chart(company: company, symbol: symbol) } else if showInsiderView { @@ -43,7 +43,7 @@ } /* - Hide all views to show later the one tapped + Hide all views to show the one selected by user */ private func resetViews() { showChartView = false