Commit 9eb9aa44 authored by David Redondo's avatar David Redondo 🏎

Don't show an arrow when the category only contains one item

BUG:426731
FIXED-IN:5.20
parent bfc56dcf
......@@ -171,7 +171,13 @@ Kirigami.ScrollablePage {
Keys.onEnterPressed: clicked();
Keys.onReturnPressed: clicked();
contentItem: CategoryItem {
showArrow: model.IsCategoryRole
showArrow: {
if (!model.IsCategoryRole) {
return false;
}
const modelIndex = delegate.ListView.view.model.index(index, 0)
return delegate.ListView.view.model.rowCount(modelIndex) > 1
}
selected: delegate.highlighted || delegate.pressed
// Only indent subcategory icons in the search view
isSearching: searchField.text.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