Commit 87bed79e authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

let initial view be saved on quit and restore on start

parent 2cfe1e4f
......@@ -19,6 +19,7 @@ RowLayout {
property bool showExpandedFilterView
property alias currentViewIndex: listViews.currentIndex
property Kirigami.ContextDrawer playlistDrawer
property alias initialIndex: viewManager.initialIndex
function goBack() {
viewManager.goBack()
......@@ -41,7 +42,6 @@ RowLayout {
id: viewManager
viewsData: viewsData
initialIndex: 3
onOpenGridView: {
if (configurationData.expectedDepth === 1) {
......
......@@ -49,6 +49,8 @@ Kirigami.ApplicationWindow {
Accessible.role: Accessible.Application
Accessible.name: title
readonly property int initialViewIndex: 3
property var goBackAction: ElisaApplication.action("go_back")
property var seekAction: ElisaApplication.action("Seek")
property var scrubAction: ElisaApplication.action("Scrub")
......@@ -125,6 +127,8 @@ Kirigami.ApplicationWindow {
property bool showPlaylist: true
property bool headerBarIsMaximized: false
property int initialIndex
}
Connections {
......@@ -155,6 +159,8 @@ Kirigami.ApplicationWindow {
persistentSettings.showPlaylist = contentView.showPlaylist
persistentSettings.headerBarIsMaximized = headerBar.isMaximized
persistentSettings.initialIndex = contentView.currentViewIndex
}
}
......@@ -286,6 +292,7 @@ Kirigami.ApplicationWindow {
showPlaylist: persistentSettings.showPlaylist
showExpandedFilterView: persistentSettings.expandedFilterView
playlistDrawer: playlistDrawer
initialIndex: persistentSettings.value('initialIndex', initialViewIndex)
}
}
}
......
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