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: { onClicked: {
lastFeed = feed.url lastFeed = feed.url
if (pageStack.depth > 1)
pageStack.pop();
pageStack.push("qrc:/EntryListPage.qml", {"feed": feed}) pageStack.push("qrc:/EntryListPage.qml", {"feed": feed})
} }
Keys.onReturnPressed: clicked() Keys.onReturnPressed: clicked()

View File

@ -182,7 +182,9 @@ Kirigami.SwipeListItem {
if (isQueue || isDownloads) { if (isQueue || isDownloads) {
lastEntry = entry.id; 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: [ actions: [