Commit 46204a5e authored by Zren (Chris Holland)'s avatar Zren (Chris Holland)

[weather] Fix weather Notices tab not showing

The code currently has a bug that will only show the Notices tab if
there's both a "warning" AND a "watch".

This patch also hides the empty Warnings/Watches heading.

Differential Revision: https://phabricator.kde.org/D18936
parent 556106bd
......@@ -21,17 +21,19 @@ Column {
id: root
property var model
readonly property bool hasContent: model && model.length > 0 && model[0].length > 0 && model[1].length > 0
readonly property bool hasContent: model && model.length > 0 && (model[0].length > 0 || model[1].length > 0)
spacing: units.largeSpacing
Notice {
title: i18nc("weather warnings", "Warnings Issued:")
model: root.model[0]
visible: model.length > 0
}
Notice {
title: i18nc("weather watches" ,"Watches Issued:")
model: root.model[1]
visible: model.length > 0
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment