diff --git a/src/qml/Desktop/HeaderBar.qml b/src/qml/Desktop/HeaderBar.qml index eeb47fe2..0325576a 100644 --- a/src/qml/Desktop/HeaderBar.qml +++ b/src/qml/Desktop/HeaderBar.qml @@ -31,8 +31,6 @@ FocusScope { if (AudioManager.entry) { pushPage("QueuePage"); pageStack.push("qrc:/EntryPage.qml", {"entry": AudioManager.entry}); - SettingsManager.lastOpenedPage = "QueuePage"; - SettingsManager.save(); pageStack.get(0).lastEntry = AudioManager.entry.id; var model = pageStack.get(0).queueList.model; for (var i = 0; i < model.rowCount(); i++) { @@ -50,8 +48,6 @@ FocusScope { if (AudioManager.entry) { pushPage("FeedListPage"); pageStack.push("qrc:/FeedDetailsPage.qml", {"feed": AudioManager.entry.feed}); - SettingsManager.lastOpenedPage = "FeedListPage"; - SettingsManager.save(); } } diff --git a/src/qml/EntryPage.qml b/src/qml/EntryPage.qml index 4fba91fd..61de6cb8 100644 --- a/src/qml/EntryPage.qml +++ b/src/qml/EntryPage.qml @@ -25,8 +25,6 @@ Kirigami.ScrollablePage { function openPodcast() { pushPage("FeedListPage"); - SettingsManager.lastOpenedPage = "FeedListPage"; // for persistency - SettingsManager.save(); lastFeed = entry.feed.url; pageStack.push("qrc:/FeedDetailsPage.qml", {"feed": entry.feed}); } diff --git a/src/qml/EpisodeListPage.qml b/src/qml/EpisodeListPage.qml index aa8e8061..a3ea4f2d 100644 --- a/src/qml/EpisodeListPage.qml +++ b/src/qml/EpisodeListPage.qml @@ -33,8 +33,6 @@ Kirigami.ScrollablePage { text: i18n("Downloads") onTriggered: { pushPage("DownloadListPage") - SettingsManager.lastOpenedPage = "DownloadListPage"; // for persistency - SettingsManager.save(); } } diff --git a/src/qml/Mobile/BottomToolbar.qml b/src/qml/Mobile/BottomToolbar.qml index ec1d2370..accbf5a6 100644 --- a/src/qml/Mobile/BottomToolbar.qml +++ b/src/qml/Mobile/BottomToolbar.qml @@ -12,9 +12,9 @@ import org.kde.kirigami 2.19 as Kirigami import org.kde.kasts 1.0 Kirigami.NavigationTabBar { - id: root + id: navBar - property alias toolbarHeight: root.implicitHeight + property alias toolbarHeight: navBar.implicitHeight property bool transparentBackground: false shadow: false @@ -23,37 +23,31 @@ Kirigami.NavigationTabBar { Kirigami.Action { icon.name: "view-media-playlist" text: i18n("Queue") - checked: "QueuePage" === SettingsManager.lastOpenedPage + checked: "QueuePage" === root.currentPage onTriggered: { pushPage("QueuePage"); - SettingsManager.lastOpenedPage = "QueuePage"; // for persistency - SettingsManager.save(); } }, Kirigami.Action { icon.name: "bookmarks" text: i18n("Subscriptions") - checked: "FeedListPage" === SettingsManager.lastOpenedPage + checked: "FeedListPage" === root.currentPage onTriggered: { pushPage("FeedListPage"); - SettingsManager.lastOpenedPage = "FeedListPage"; // for persistency - SettingsManager.save(); } }, Kirigami.Action { icon.name: "rss" text: i18n("Episodes") - checked: "EpisodeListPage" === SettingsManager.lastOpenedPage + checked: "EpisodeListPage" === root.currentPage onTriggered: { pushPage("EpisodeListPage") - SettingsManager.lastOpenedPage = "EpisodeListPage" // for persistency - SettingsManager.save(); } }, Kirigami.Action { icon.name: "settings-configure" text: i18n("Settings") - checked: "SettingsPage" === SettingsManager.lastOpenedPage + checked: "SettingsPage" === root.currentPage onTriggered: { applicationWindow().pageStack.clear() applicationWindow().pageStack.push("qrc:/SettingsPage.qml", {}, { diff --git a/src/qml/main.qml b/src/qml/main.qml index 462c4f70..b875c7dc 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -75,6 +75,7 @@ Kirigami.ApplicationWindow { property var desktopWidth property var desktopHeight property int headerSize: Kirigami.Units.gridUnit * 5 + property alias lastOpenedPage: root.currentPage } function saveWindowLayout() { @@ -103,8 +104,7 @@ Kirigami.ApplicationWindow { Component.onCompleted: { restoreWindowLayout(); - currentPage = SettingsManager.lastOpenedPage; - pageStack.initialPage = getPage(SettingsManager.lastOpenedPage); + pageStack.initialPage = getPage(currentPage); // Delete played enclosures if set in settings if (SettingsManager.autoDeleteOnPlayed == 2) { @@ -178,8 +178,6 @@ Kirigami.ApplicationWindow { checked: currentPage == "QueuePage" onClicked: { pushPage("QueuePage") - SettingsManager.lastOpenedPage = "QueuePage" // for persistency - SettingsManager.save(); } } Kirigami.NavigationTabButton { @@ -190,8 +188,6 @@ Kirigami.ApplicationWindow { checked: currentPage == "DiscoverPage" onClicked: { pushPage("DiscoverPage") - SettingsManager.lastOpenedPage = "DiscoverPage" // for persistency - SettingsManager.save(); } } Kirigami.NavigationTabButton { @@ -202,8 +198,6 @@ Kirigami.ApplicationWindow { checked: currentPage == "FeedListPage" onClicked: { pushPage("FeedListPage") - SettingsManager.lastOpenedPage = "FeedListPage" // for persistency - SettingsManager.save(); } } Kirigami.NavigationTabButton { @@ -214,8 +208,6 @@ Kirigami.ApplicationWindow { checked: currentPage == "EpisodeListPage" onClicked: { pushPage("EpisodeListPage") - SettingsManager.lastOpenedPage = "EpisodeListPage" // for persistency - SettingsManager.save(); } } Kirigami.NavigationTabButton { @@ -226,8 +218,6 @@ Kirigami.ApplicationWindow { checked: currentPage == "DownloadListPage" onClicked: { pushPage("DownloadListPage") - SettingsManager.lastOpenedPage = "DownloadListPage" // for persistency - SettingsManager.save(); } } } diff --git a/src/settingsmanager.kcfg b/src/settingsmanager.kcfg index 07c45299..a30f75a0 100644 --- a/src/settingsmanager.kcfg +++ b/src/settingsmanager.kcfg @@ -128,10 +128,6 @@ - - - FeedListPage - 30