Commit 98c7fffe authored by Volker Krause's avatar Volker Krause
Browse files

Also add earlier/later journey search actions to the context menu

Improves discoverability over the slightly unusual placement above and
below the list view.
parent 16500ec9
......@@ -18,6 +18,20 @@ Kirigami.ScrollablePage {
id: root
title: i18n("Departures")
contextualActions: [
Kirigami.Action {
text: i18n("Earlier")
iconName: "go-up-symbolic"
onTriggered: departureModel.queryPrevious()
enabled: departureModel.canQueryPrevious
},
Kirigami.Action {
text: i18n("Later")
iconName: "go-down-symbolic"
onTriggered: departureModel.queryNext()
enabled: departureModel.canQueryNext
}
]
StopoverQueryModel {
id: departureModel
......
......@@ -18,6 +18,21 @@ Kirigami.ScrollablePage {
id: root
title: i18n("Alternative Connections")
contextualActions: [
Kirigami.Action {
text: i18n("Earlier")
iconName: "go-up-symbolic"
onTriggered: journeyModel.queryPrevious()
enabled: journeyModel.canQueryPrevious
},
Kirigami.Action {
text: i18n("Later")
iconName: "go-down-symbolic"
onTriggered: journeyModel.queryNext()
enabled: journeyModel.canQueryNext
}
]
JourneyQueryModel {
id: journeyModel
......
......@@ -49,6 +49,18 @@ Kirigami.ScrollablePage {
TransferManager.discardTransfer(root.transfer);
applicationWindow().pageStack.pop();
}
},
Kirigami.Action {
text: i18n("Earlier")
iconName: "go-up-symbolic"
onTriggered: journeyModel.queryPrevious()
enabled: journeyModel.canQueryPrevious
},
Kirigami.Action {
text: i18n("Later")
iconName: "go-down-symbolic"
onTriggered: journeyModel.queryNext()
enabled: journeyModel.canQueryNext
}
]
}
......
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