Commit 10f771a8 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵

ensure filters are working on the grid views

parent 4c58669e
......@@ -20,7 +20,7 @@ FocusScope {
property string mainTitle
property string secondaryTitle
property url image
property alias contentModel: delegateModel.model
property AbstractProxyModel contentModel
property alias showRating: navigationBar.showRating
property bool delegateDisplaySecondaryText: true
property alias expandedFilterView: navigationBar.expandedFilterView
......@@ -54,27 +54,28 @@ FocusScope {
secondaryTitle: gridView.secondaryTitle
image: gridView.image
enableGoBack: gridView.isSubPage || depth > 1
sortOrder: if (contentModel) {contentModel.sortedAscending} else true
sortOrder: if (gridView.contentModel) {gridView.contentModel.sortedAscending} else true
Layout.fillWidth: true
Loader {
active: contentModel !== undefined
active: gridView.contentModel
sourceComponent: Binding {
target: contentModel
target: gridView.contentModel
property: 'filterText'
when: gridView.contentModel
value: navigationBar.filterText
}
}
Loader {
active: contentModel !== undefined
active: gridView.contentModel
sourceComponent: Binding {
target: contentModel
target: gridView.contentModel
property: 'filterRating'
when: contentModel !== undefined
when: gridView.contentModel
value: navigationBar.filterRating
}
}
......@@ -93,6 +94,8 @@ FocusScope {
DelegateModel {
id: delegateModel
model: gridView.contentModel
delegate: GridBrowserDelegate {
width: elisaTheme.gridDelegateSize
height: contentDirectoryView.cellHeight
......
......@@ -23,7 +23,7 @@ FocusScope {
property int databaseId
property alias delegate: delegateModel.delegate
property bool showSection: false
property alias contentModel: delegateModel.model
property AbstractProxyModel contentModel
property alias expandedFilterView: navigationBar.expandedFilterView
property bool haveTreeModel: false
property alias showRating: navigationBar.showRating
......@@ -60,6 +60,8 @@ FocusScope {
DelegateModel {
id: delegateModel
model: listView.contentModel
}
ColumnLayout {
......@@ -74,16 +76,26 @@ FocusScope {
Layout.fillWidth: true
Binding {
target: contentModel
property: 'filterText'
value: navigationBar.filterText
Loader {
active: listView.contentModel
sourceComponent: Binding {
target: listView.contentModel
property: 'filterText'
when: listView.contentModel
value: navigationBar.filterText
}
}
Binding {
target: contentModel
property: 'filterRating'
value: navigationBar.filterRating
Loader {
active: listView.contentModel
sourceComponent: Binding {
target: listView.contentModel
property: 'filterRating'
when: listView.contentModel
value: navigationBar.filterRating
}
}
onEnqueue: contentModel.enqueueToPlayList()
......
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