Skip to content

Commit

Permalink
added text alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
ronan18 committed Feb 14, 2020
1 parent 86ad03d commit 62d5729
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Arrival-iOS2/TrainComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ struct TrainComponent: View {
Text("departs").font(.caption)

if (String(departs) != "Leaving") {
Text(String(departs)).font(.headline) + Text(" " + unit).font(.subheadline)
if (unit.isEmpty) {
Text(String(departs)).font(.headline).font(.subheadline)
} else {
Text(String(departs)).font(.headline) + Text(" " + unit).font(.subheadline)
}


} else {
Text(String("now")).font(.headline)
Expand Down

0 comments on commit 62d5729

Please sign in to comment.