Commit ae1e7105 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Use the delegateRecycler variable to find the ListView attached object

parent b657ff2b
......@@ -22,7 +22,7 @@ import QtQuick.Controls 2.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.1
import "navigation.js" as Navigation
import org.kde.kirigami 2.4 as Kirigami
import org.kde.kirigami 2.6 as Kirigami
Kirigami.AbstractCard
{
......@@ -31,14 +31,13 @@ Kirigami.AbstractCard
property bool compact: false
property bool showRating: true
showClickFeedback: true
property var view: null
function trigger() {
if (view)
view.currentIndex = index
if (delegateRecycler.ListView.view)
delegateRecycler.ListView.view.currentIndex = index
Navigation.openApplication(application)
}
highlighted: ListView.isCurrentItem
highlighted: delegateRecycler.ListView.isCurrentItem
Keys.onReturnPressed: trigger()
onClicked: trigger()
......
......@@ -149,7 +149,6 @@ DiscoverPage {
application: model.application
compact: page.compact
showRating: page.showRating
view: apps
}
Label {
......
......@@ -53,7 +53,6 @@ DiscoverPage
delegate: ApplicationDelegate {
application: model.application
compact: page.compact
view: apps
}
footer: Kirigami.Heading {
......
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