Commit 3fa156c2 authored by Volker Krause's avatar Volker Krause

Show useful title if we have no train name/number yet

parent af9202ef
......@@ -30,7 +30,12 @@ App.TimelineDelegate {
headerIconSource: "qrc:///images/train.svg"
headerItem: RowLayout {
QQC2.Label {
text: reservationFor.trainName + " " + reservationFor.trainNumber
text: {
if (reservationFor.trainName || reservationFor.trainNumber) {
return reservationFor.trainName + " " + reservationFor.trainNumber
}
return i18n("%1 to %2", reservationFor.departureStation.name, reservationFor.arrivalStation.name);
}
color: Kirigami.Theme.textColor
font.pointSize: Kirigami.Theme.defaultFont.pointSize * root.headerFontScale
Layout.fillWidth: true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment