Show error message when playlist is empty

Because an empty playlist indicates that an error occurred.
This commit is contained in:
Casper Jeukendrup 2021-11-20 16:15:43 +01:00
parent 50c8d68710
commit 21869a8e3f
No known key found for this signature in database
GPG key ID: 6C571BEF59E722DD

View file

@ -72,6 +72,7 @@ FocusScope {
readonly property int columns: Math.max(0, Math.floor(width / cellWidth))
visible: count > 0
anchors.fill: parent
anchors.leftMargin: root.sideMargin - spacingBetweenColumns / 2
anchors.rightMargin: root.sideMargin - spacingBetweenColumns / 2
@ -132,4 +133,29 @@ FocusScope {
}
}
}
Column {
id: errorMessageColumn
visible: !view.visible
anchors.top: parent.top
anchors.topMargin: topGradient.height + Math.max(parent.height / 4 - height / 2, 0)
anchors.left: parent.left
anchors.leftMargin: root.sideMargin
anchors.right: parent.right
anchors.rightMargin: root.sideMargin
spacing: 6
StyledTextLabel {
width: parent.width
font: ui.theme.tabBoldFont
text: qsTrc("learn", "Sorry, but we cant load these videos right now")
}
StyledTextLabel {
width: parent.width
text: qsTrc("learn", "Please check your internet connection, or try again later.")
}
}
}