Commit 7ba7cf9a authored by Volker Krause's avatar Volker Krause
Browse files

Clear the page stack before pushing new details pages

Makes little difference on the phone, but when running on desktop this
avoids some weird page orders.
parent a1f67120
......@@ -92,6 +92,6 @@ App.TimelineDelegate {
}
}
onClicked: applicationWindow().pageStack.push(detailsComponent);
onClicked: showDetails(detailsComponent)
}
......@@ -72,6 +72,6 @@ App.TimelineDelegate {
}
}
onClicked: applicationWindow().pageStack.push(detailsComponent);
onClicked: showDetails(detailsComponent)
}
......@@ -69,5 +69,5 @@ App.TimelineDelegate {
}
}
onClicked: applicationWindow().pageStack.push(detailsComponent);
onClicked: showDetails(detailsComponent)
}
......@@ -109,5 +109,5 @@ App.TimelineDelegate {
}
}
onClicked: applicationWindow().pageStack.push(detailsComponent);
onClicked: showDetails(detailsComponent)
}
......@@ -56,5 +56,5 @@ App.TimelineDelegate {
}
}
onClicked: applicationWindow().pageStack.push(detailsComponent);
onClicked: showDetails(detailsComponent)
}
......@@ -47,5 +47,5 @@ App.TimelineDelegate {
}
}
onClicked: applicationWindow().pageStack.push(detailsComponent);
onClicked: showDetails(detailsComponent)
}
......@@ -41,6 +41,13 @@ Kirigami.AbstractCard {
property alias arrival: _controller.arrival
property alias departure: _controller.departure
function showDetails(detailsComponent) {
while (applicationWindow().pageStack.depth > 1) {
applicationWindow().pageStack.pop();
}
applicationWindow().pageStack.push(detailsComponent);
}
header: Rectangle {
id: headerBackground
Kirigami.Theme.colorSet: controller.isCurrent ? Kirigami.Theme.Selection : Kirigami.Theme.Complementary
......
......@@ -48,5 +48,5 @@ App.TimelineDelegate {
}
}
onClicked: applicationWindow().pageStack.push(detailsComponent);
onClicked: showDetails(detailsComponent)
}
......@@ -104,5 +104,5 @@ App.TimelineDelegate {
}
}
onClicked: applicationWindow().pageStack.push(detailsComponent);
onClicked: showDetails(detailsComponent)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment