Fix not popping enough pages when feed is removed

This commit is contained in:
Bart De Vries 2021-04-05 12:52:56 +02:00
parent 0aa9e91f19
commit 8bb027dc82
1 changed files with 3 additions and 3 deletions

View File

@ -26,8 +26,7 @@ Kirigami.SwipeListItem {
onClicked: {
lastFeed = model.feed.url
while(pageStack.depth > 1)
pageStack.pop()
pageStack.push("qrc:/EntryListPage.qml", {"feed": model.feed})
}
}
@ -37,7 +36,8 @@ Kirigami.SwipeListItem {
icon.name: "delete"
onTriggered: {
if(pageStack.depth > 1 && model.feed.url === lastFeed)
pageStack.pop()
while(pageStack.depth > 1)
pageStack.pop()
feedsModel.removeFeed(index)
}
}