Close EntryListPage when feed is deleted
This commit is contained in:
parent
276d8ba831
commit
e4735623cb
@ -29,6 +29,8 @@ import org.kde.alligator 1.0
|
|||||||
Kirigami.ScrollablePage {
|
Kirigami.ScrollablePage {
|
||||||
title: "Alligator"
|
title: "Alligator"
|
||||||
|
|
||||||
|
property var lastFeed: ""
|
||||||
|
|
||||||
contextualActions: [
|
contextualActions: [
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18n("Add feed")
|
text: i18n("Add feed")
|
||||||
@ -103,12 +105,19 @@ Kirigami.ScrollablePage {
|
|||||||
actions: [
|
actions: [
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
icon.name: "delete"
|
icon.name: "delete"
|
||||||
onTriggered: feedListModel.removeFeed(index)
|
onTriggered: {
|
||||||
|
if(pageStack.depth > 1 && model.url === lastFeed)
|
||||||
|
pageStack.pop()
|
||||||
|
feedListModel.removeFeed(index)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
onClicked: pageStack.push("qrc:/EntryListPage.qml", {"data": model})
|
onClicked: {
|
||||||
|
lastFeed = model.url
|
||||||
|
pageStack.push("qrc:/EntryListPage.qml", {"data": model})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user