diff options
Diffstat (limited to 'qt-mobile/qml/DiveList.qml')
-rw-r--r-- | qt-mobile/qml/DiveList.qml | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml index 21858afb4..7b300ed24 100644 --- a/qt-mobile/qml/DiveList.qml +++ b/qt-mobile/qml/DiveList.qml @@ -106,7 +106,19 @@ MobileComponents.Page { MobileComponents.Heading { id: sectionText - text: {section == "--" ? "" : section } + text: { + // if the tripMeta (which we get as "section") ends in ::-- we know + // that there's no trip -- otherwise strip the meta information before + // the :: and show the trip location + var shownText + var endsWithDoubleDash = /::--$/; + if (endsWithDoubleDash.test(section)) { + shownText = "" + } else { + shownText = section.replace(/.*::/, "") + } + shownText + } anchors { top: parent.top left: parent.left @@ -150,7 +162,7 @@ MobileComponents.Page { boundsBehavior: Flickable.StopAtBounds maximumFlickVelocity: parent.height * 5 cacheBuffer: 0 // seems to avoid empty rendered profiles - section.property: "dive.trip" + section.property: "dive.tripMeta" section.criteria: ViewSection.FullString section.delegate: tripHeading header: MobileComponents.Heading { |