Merge v0.6.0 and v0.6.1 #29

Merged
dorian merged 30 commits from version/0.5.1 into master 2024-10-17 17:52:37 +02:00
2 changed files with 19 additions and 9 deletions
Showing only changes of commit 14bbd77e71 - Show all commits

View file

@ -42,6 +42,7 @@ DataListView {
}
property var widgetData: currentWidgetData
property var athletes
function getSubtitle() {
var titleString
@ -110,6 +111,14 @@ DataListView {
selector.appear(selectOptions, qsTr("select cat"))
}
function filterAthletes(athletes) {
var filtered = athletes.filter(function(athlete){
return parseInt(athlete.cat) === parseInt(params.cat)
})
return filtered
}
Connections {
target: selector
function onSelectionFinished(index, data) {
@ -119,12 +128,9 @@ DataListView {
}
}
status: model === 0 ? 901:200
model: widgetData[ 'athletes' ] === undefined ? 0:widgetData[ 'athletes' ].length
Component.onCompleted: {
if(model > 0){
athletes = filterAthletes(widgetData["athletes"])
if(athletes.length > 0){
control.ready = true
control.status = 200
}
@ -136,16 +142,19 @@ DataListView {
onRefresh: {
updateData({}, false)
athletes = []
athletes = filterAthletes(widgetData["athletes"])
}
model: athletes
delegate: ItemDelegate {
id: partDel
property int thisIndex: index
property var thisData: widgetData[ "athletes" ][index]
property var thisData: modelData
width: parent.width
height: parseInt(thisData.cat) === parseInt(params.cat) ? 50:0
width: parseInt(thisData.cat) === parseInt(params.cat) ? control.width:control.width * 0.2
opacity: 0
scale: 0.9

View file

@ -134,6 +134,7 @@ Window {
//mainStack.push("Pages/AthleteSearchPage.qml")
//openWidget({comp: 11651, cat: 26})
//openWidget({person: 6623})
openWidget({cat: 35, comp: 11181, type: "starters"})
}
FontLoader {