Commit b1b4056d authored by Administrator's avatar Administrator

bugfix: missing timeStamp on interval

parent 8e909ed1
......@@ -288,6 +288,7 @@ class Interval {
distance = (records.last.distance - records.first.distance).round();
duration = records.last.timeStamp.difference(records.first.timeStamp);
ftp = Ftp.calculate(records: records);
timeStamp = records.first.timeStamp;
await setValues();
}
......
......@@ -303,10 +303,9 @@ class _ActivityIntervalsChartState extends State<ActivityIntervalsChart> {
record.id <= interval.firstRecordId &&
record.id <= interval.lastRecordId)
.toList());
await interval.calculateAndSave(records: records);
interval.athletesId = widget.athlete.id;
interval.activitiesId = widget.activity.id;
interval.timeStamp = records.first.timeStamp;
await interval.calculateAndSave(records: records);
widget.activity.cachedIntervals = <encrateia.Interval>[];
setState(() {});
},
......
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