Skip to content
Snippets Groups Projects
Commit a63946b5 authored by Leon Vitanos's avatar Leon Vitanos Committed by Jean-Baptiste Kempf
Browse files

qml: use nbItemPerRow of "Videos" model instead of recentVideos

fixes a constant model reset, when there are no resent videos
parent 4ee84035
No related branches found
No related tags found
1 merge request!4845qml: fix constant model reset of recent videos
Pipeline #433061 passed with stage
in 25 minutes and 42 seconds
......@@ -264,6 +264,8 @@ VideoAll {
leftPadding: root.leftPadding
rightPadding: root.rightPadding
nbItemPerRow: Helpers.get(root.currentItem, "nbItemPerRow", 0)
subtitleText: (root.model && root.model.count > 0) ? I18n.qtr("Videos") : ""
Navigation.parentItem: root
......
......@@ -41,6 +41,8 @@ FocusScope {
property int leftPadding: VLCStyle.margin_xsmall
property int rightPadding: VLCStyle.margin_xsmall
property int nbItemPerRow
// Settings
implicitHeight: recentVideosColumn.height
......@@ -62,8 +64,7 @@ FocusScope {
ml: MediaLib
limit: MainCtx.gridView ? view.currentItem.nbItemPerRow ?
view.currentItem.nbItemPerRow : 0
limit: MainCtx.gridView ? root.nbItemPerRow
: 5
searchPattern: MainCtx.search.pattern
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment