diff --git a/CHANGELOG.md b/CHANGELOG.md index cd073b8..00b9c7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +# [0.03.1] - UR +### Changed +- the boulder result rect doesn't have a background if there is no result now +- the selected route is kept when changing cats + # [0.03.0] - 2019-07-11 ### Added - it is not possible to pin competitions and only show these diff --git a/android-sources/AndroidManifest.xml b/android-sources/AndroidManifest.xml index c111193..999e16e 100644 --- a/android-sources/AndroidManifest.xml +++ b/android-sources/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/resources/qml/Pages/WidgetPage.qml b/resources/qml/Pages/WidgetPage.qml index 4d62883..a9b8ab2 100644 --- a/resources/qml/Pages/WidgetPage.qml +++ b/resources/qml/Pages/WidgetPage.qml @@ -65,6 +65,7 @@ Page { // person: personId, // cat: categoryId, // nation: nationString ('', 'GER', 'SUI') + // route: (int) round // type: ('','starters', 'nat_team_ranking', 'sektionenwertung', 'regionalzentren'), //} @@ -83,6 +84,12 @@ Page { root.ready = false } } + else if(ret["status"] === 404 && [WidgetPage.WidgetType.Registration, WidgetPage.WidgetType.Startlist, WidgetPage.WidgetType.Result].includes(root.widgetType) && root.params["route"] !== "") { + // if we get a 404 and have startlist, results or registration, the route was not found -> remove round and try again + root.params["route"] = "" + loadData(root.params) + return + } else { root.ready = false } @@ -95,28 +102,13 @@ Page { if(openLoadingDl) loadingDl.open() - var oldParams = Object.assign({}, root.params) - // update all the given values - for(var prop in params){ - if(params.hasOwnProperty(prop)){ - if(params[prop] === null){ - delete root.params[prop] - } - else { - root.params[prop] = params[prop] - } - } - } + Object.assign(root.params, params) loadData(root.params) console.log("ready: " + root.ready + ": " + root.status) - if(root.status !== 200) - root.params = oldParams - - if(openLoadingDl) loadingDl.close() diff --git a/resources/qml/Widgets/ResultWidget.qml b/resources/qml/Widgets/ResultWidget.qml index aa826b1..2d4588b 100644 --- a/resources/qml/Widgets/ResultWidget.qml +++ b/resources/qml/Widgets/ResultWidget.qml @@ -165,7 +165,7 @@ DataListView { target: selector onSelectionFinished: { if(data.cat !== undefined){ - updateData({cat: data.cat, route:""}, true) + updateData({cat: data.cat}, true) } } } @@ -306,11 +306,10 @@ DataListView { resultString = resultString.replace("z", "") resultString = resultString.replace("b", "") resultList = resultString.split(" ") - } - - while (resultList.length < 2){ - resultList.unshift(0) + while (resultList.length < 2){ + resultList.unshift(0) + } } return resultList @@ -373,8 +372,11 @@ DataListView { context.arc(radius + offsetX, radius + offsetY, radius, Math.PI, 1.5 * Math.PI); // fill - context.fillStyle = "#b7b7b7"; - context.fill(); + if(resultData[0] !== undefined) { + // if there is a result available -> draw background + context.fillStyle = "#b7b7b7"; + context.fill(); + } // outline context.lineWidth = 1; @@ -459,7 +461,7 @@ DataListView { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter - text: boulderResCv.resultData[1] + text: boulderResCv.resultData[1] === undefined ? "0":boulderResCv.resultData[1] } Label { @@ -483,7 +485,7 @@ DataListView { verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter - text: boulderResCv.resultData[0] + text: boulderResCv.resultData[0] === undefined ? "0":boulderResCv.resultData[0] } }