Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanVanAssche committed Feb 20, 2019
2 parents 4e9d457 + b8ffc85 commit f4a6517
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
9 changes: 8 additions & 1 deletion qml/pages/TripPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ Page {
onStatusChanged: status===PageStatus.Active? getData(): undefined

function getData() {
api.getConnections(from, to, IRail.Arrival, date, Utils.convertTransportType(settings.transportFilter))
var arrdep;
if(settings.timeIs === 0) {
arrdep = IRail.Departure
}
else {
arrdep = IRail.Arrival;
}
api.getConnections(from, to, arrdep, date, Utils.convertTransportType(settings.transportFilter))
}

Connections {
Expand Down
3 changes: 3 additions & 0 deletions rpm/harbour-berail.changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# * date Author's Name <author's email> version-release
# - Summary of changes

* Mon Jan 8 2018 Dylan Van Assche <[email protected]> 2.1-1
- [MAJOR BUGFIX] Time selection for route planner works again.

* Mon Jan 8 2018 Dylan Van Assche <[email protected]> 2.0-2
- [MINOR BUGFIX] Workaround for iRail API issue #335

Expand Down
4 changes: 2 additions & 2 deletions rpm/harbour-berail.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Name: harbour-berail
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: BeRail
Version: 2.0
Release: 2
Version: 2.1
Release: 1
Group: Qt/Qt
License: GPLv3
URL: http://dylanvanassche.be/
Expand Down
4 changes: 2 additions & 2 deletions rpm/harbour-berail.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: harbour-berail
Summary: BeRail
Version: 2.0
Release: 2
Version: 2.1
Release: 1
# The contents of the Group field should be one of the groups listed here:
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS
Group: Qt/Qt
Expand Down
4 changes: 2 additions & 2 deletions src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ QString API::parseTime(QDateTime time)
}

QString API::parseArrdep(IRail::ArrDep arrdep) {
if(arrdep == IRail::ArrDep::Arrival)
if(arrdep == IRail::ArrDep::Arrival)
{
return "arrival";
}
Expand Down Expand Up @@ -221,7 +221,7 @@ void API::getLiveboard(QString stationName, QDateTime time, IRail::ArrDep arrdep
parameters.addQueryItem("station", stationName);
parameters.addQueryItem("date", this->parseDate(time));
parameters.addQueryItem("time", this->parseTime(time));
parameters.addQueryItem("arrdep", this->parseArrdep(arrdep));
parameters.addQueryItem("timesel", this->parseArrdep(arrdep));
parameters.addQueryItem("alerts", "true");

// Prepare & do request
Expand Down

0 comments on commit f4a6517

Please sign in to comment.