Garmin: Fix activity sync stuck when keep activity data on device is enabled

This commit is contained in:
José Rebelo
2026-03-21 21:22:50 +00:00
parent 349e3516dd
commit 4c81beed00
@@ -871,8 +871,8 @@ public class GarminSupport extends AbstractBTLESingleDeviceSupport implements IC
FileTransferHandler.DirectoryEntry directoryEntry = currentlyDownloading.getDirectoryEntry();
if (alreadyDownloaded(directoryEntry)) {
LOG.debug("File: {} already downloaded, not downloading again.", directoryEntry.getFileName());
currentlyDownloading = null;
if (!getKeepActivityDataOnDevice()) { // delete file from watch if already downloaded
currentlyDownloading = null;
sendOutgoingMessage("archive file " + directoryEntry.getFileIndex(), new SetFileFlagsMessage(directoryEntry.getFileIndex(), SetFileFlagsMessage.FileFlags.ARCHIVE));
}
if (directoryEntry.getFiletype() != FileType.FILETYPE.DIRECTORY) {