Fix subtle problem with pushing EntryPages and EntryListPages to pageStack

This commit is contained in:
Bart De Vries 2021-09-06 14:19:19 +02:00
parent 2e6bd7bdcc
commit 938a517f09
2 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,8 @@ Controls.ItemDelegate {
onClicked: {
lastFeed = feed.url
if (pageStack.depth > 1)
pageStack.pop();
pageStack.push("qrc:/EntryListPage.qml", {"feed": feed})
}
Keys.onReturnPressed: clicked()

View File

@ -182,7 +182,9 @@ Kirigami.SwipeListItem {
if (isQueue || isDownloads) {
lastEntry = entry.id;
}
pageStack.push("qrc:/EntryPage.qml", {"entry": entry})
if (pageStack.depth > (currentPage === "FeedListPage" ? 2 : 1))
pageStack.pop();
pageStack.push("qrc:/EntryPage.qml", {"entry": entry});
}
actions: [