mirror of
https://github.com/KDE/kasts.git
synced 2025-02-02 18:36:57 +01:00
Improve PageStack stability
This commit is contained in:
parent
4b3cb345e3
commit
4ff3987e0f
@ -26,18 +26,10 @@ Kirigami.SwipeListItem {
|
|||||||
bold: !model.entry.read
|
bold: !model.entry.read
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if(pageStack.depth > 2)
|
while(pageStack.depth > 2)
|
||||||
pageStack.pop()
|
pageStack.pop()
|
||||||
model.entry.read = true
|
model.entry.read = true
|
||||||
pageStack.push("qrc:/EntryPage.qml", {"entry": model.entry})
|
pageStack.push("qrc:/EntryPage.qml", {"entry": model.entry})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
actions: [
|
|
||||||
Kirigami.Action {
|
|
||||||
text: i18n("Open in Browser")
|
|
||||||
icon.name: "globe"
|
|
||||||
onTriggered: Qt.openUrlExternally(model.entry.link)
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,11 @@ Kirigami.ScrollablePage {
|
|||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
iconName: "help-about-symbolic"
|
iconName: "help-about-symbolic"
|
||||||
text: i18n("Details")
|
text: i18n("Details")
|
||||||
onTriggered: pageStack.push("qrc:/FeedDetailsPage.qml", {"feed": feed})
|
onTriggered: {
|
||||||
|
while(pageStack.depth > 2)
|
||||||
|
pageStack.pop()
|
||||||
|
pageStack.push("qrc:/FeedDetailsPage.qml", {"feed": feed})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ Kirigami.SwipeListItem {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
lastFeed = model.feed.url
|
lastFeed = model.feed.url
|
||||||
|
while(pageStack.depth > 1)
|
||||||
|
pageStack.pop()
|
||||||
pageStack.push("qrc:/EntryListPage.qml", {"feed": model.feed})
|
pageStack.push("qrc:/EntryListPage.qml", {"feed": model.feed})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user