# HG changeset patch # User Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> # Date 1623516887 -7200 # Node ID a38e8acccb85945649a57bde7b90b03276755808 # Parent 9b7af8e83d128a759fbaebf65acd11b825a72e1f Minor UI changes diff -r 9b7af8e83d12 -r a38e8acccb85 LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate Binary file LazyBear.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed diff -r 9b7af8e83d12 -r a38e8acccb85 LazyBear/Views/Home/HomeView.swift --- a/LazyBear/Views/Home/HomeView.swift Sat Jun 12 15:20:04 2021 +0200 +++ b/LazyBear/Views/Home/HomeView.swift Sat Jun 12 18:54:47 2021 +0200 @@ -34,7 +34,7 @@ let mirror = Mirror(reflecting: lists) ForEach(Array(mirror.children), id: \.label) { child in if let list = child.value as? [String : QuoteModel] { - StockRow(listName: "\(child.label!)", list: list, intradayPrices: home.data.intradayPrices, addOnDelete: false) + StockRow(listName: "\(adaptListTitle(child.label!))", list: list, intradayPrices: home.data.intradayPrices, addOnDelete: false) .listRowInsets(EdgeInsets()) } } @@ -71,6 +71,17 @@ } } + + /* + Get list keys (mostactive, losers, active) and adapt them to diplay + */ + private func adaptListTitle(_ title: String) -> String { + if title == "mostactive" { + return "Most active" + } else { + return title.capitalized + } + } } struct HomeView_Previews: PreviewProvider {