account for changed itineraries once landmarks are marked as done or deleted
This commit is contained in:
@@ -22,6 +22,14 @@ class _StepBetweenLandmarksState extends State<StepBetweenLandmarks> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
int? time = widget.current.tripTime?.inMinutes;
|
||||
|
||||
// since landmarks might have been marked as visited, the next landmark might not be the immediate next in the list
|
||||
// => the precomputed trip time is not valid anymore
|
||||
if (widget.current.next != widget.next) {
|
||||
time = null;
|
||||
}
|
||||
|
||||
// round 0 travel time to 1 minute
|
||||
if (time != null && time < 1) {
|
||||
time = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user