From 1a068e3217b23fbbfe06f52c4fb05fea108e004a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Z=C3=B6ller?= Date: Sun, 11 Jan 2026 12:05:12 +0100 Subject: [PATCH] Fixes for indoor activity markers --- .../operaton/fitpub/model/dto/ActivityDTO.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/org/operaton/fitpub/model/dto/ActivityDTO.java b/src/main/java/org/operaton/fitpub/model/dto/ActivityDTO.java index e7328ba..b2bd2b9 100644 --- a/src/main/java/org/operaton/fitpub/model/dto/ActivityDTO.java +++ b/src/main/java/org/operaton/fitpub/model/dto/ActivityDTO.java @@ -54,6 +54,11 @@ public class ActivityDTO { private List> trackPoints; // Full track points from JSONB private Boolean hasGpsTrack; // True if activity has GPS data (outdoor), false for indoor activities + // Indoor activity detection + private Boolean indoor; // True if activity was performed indoors + private String subSport; // SubSport field from FIT file (e.g., INDOOR_CYCLING, TREADMILL) + private String indoorDetectionMethod; // How indoor flag was determined + // Social interaction counts (populated separately) private Long likesCount; private Long commentsCount; @@ -141,6 +146,11 @@ public class ActivityDTO { builder.trackPoints(parseTrackPoints(activity.getTrackPointsJson())); } + // Indoor activity detection fields + builder.indoor(activity.getIndoor() != null ? activity.getIndoor() : false); + builder.subSport(activity.getSubSport()); + builder.indoorDetectionMethod(activity.getIndoorDetectionMethod()); + return builder.build(); } @@ -219,6 +229,9 @@ public class ActivityDTO { .createdAt(activity.getCreatedAt()) .updatedAt(activity.getUpdatedAt()) .hasGpsTrack(false) // Mark as no GPS data available + .indoor(activity.getIndoor() != null ? activity.getIndoor() : false) + .subSport(activity.getSubSport()) + .indoorDetectionMethod(activity.getIndoorDetectionMethod()) .build(); } @@ -259,6 +272,11 @@ public class ActivityDTO { builder.trackPoints(parseTrackPoints(filteredTrackPointsJson)); } + // Indoor activity detection fields + builder.indoor(activity.getIndoor() != null ? activity.getIndoor() : false); + builder.subSport(activity.getSubSport()); + builder.indoorDetectionMethod(activity.getIndoorDetectionMethod()); + return builder.build(); }