mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Don't add any where-filter if selecting Vo2MaxSample.Type.ANY
At best this would be pointless but on devices not supporting separate running/cycling VO2max this would result in returning no value at all.
This commit is contained in:
committed by
José Rebelo
parent
0636edbb7e
commit
1a5ce6e7c6
+5
-2
@@ -137,10 +137,13 @@ public class WorkoutVo2MaxSampleProvider implements Vo2MaxSampleProvider<Vo2MaxS
|
||||
final QueryBuilder<BaseActivitySummary> qb,
|
||||
final Vo2MaxSample.Type type,
|
||||
final GBDevice device) {
|
||||
if (type == Vo2MaxSample.Type.ANY)
|
||||
return;
|
||||
|
||||
final List<Integer> codes = new ArrayList<>();
|
||||
|
||||
if (coordinator.supportsVO2MaxRunning(device)) {
|
||||
if (type == Vo2MaxSample.Type.ANY || type == Vo2MaxSample.Type.RUNNING) {
|
||||
if (type == Vo2MaxSample.Type.RUNNING) {
|
||||
codes.addAll(Arrays.asList(
|
||||
ActivityKind.INDOOR_RUNNING.getCode(),
|
||||
ActivityKind.OUTDOOR_RUNNING.getCode(),
|
||||
@@ -150,7 +153,7 @@ public class WorkoutVo2MaxSampleProvider implements Vo2MaxSampleProvider<Vo2MaxS
|
||||
}
|
||||
}
|
||||
if (coordinator.supportsVO2MaxCycling(device)) {
|
||||
if (type == Vo2MaxSample.Type.ANY || type == Vo2MaxSample.Type.CYCLING) {
|
||||
if (type == Vo2MaxSample.Type.CYCLING) {
|
||||
codes.addAll(Arrays.asList(
|
||||
ActivityKind.CYCLING.getCode(),
|
||||
ActivityKind.INDOOR_CYCLING.getCode(),
|
||||
|
||||
Reference in New Issue
Block a user