Show error message when playlist is empty
Because an empty playlist indicates that an error occurred.
This commit is contained in:
parent
50c8d68710
commit
21869a8e3f
1 changed files with 26 additions and 0 deletions
|
@ -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 can’t load these videos right now")
|
||||
}
|
||||
|
||||
StyledTextLabel {
|
||||
width: parent.width
|
||||
text: qsTrc("learn", "Please check your internet connection, or try again later.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue