From 5e311a401569e27a815eccc7a489d9b668b9bf77 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Mon, 31 Oct 2022 19:27:54 +0100 Subject: [PATCH] Fix feedback loop --- Pal.Client/Pal.Client.csproj | 2 +- Pal.Client/Plugin.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Pal.Client/Pal.Client.csproj b/Pal.Client/Pal.Client.csproj index b0e850d..eca55a6 100644 --- a/Pal.Client/Pal.Client.csproj +++ b/Pal.Client/Pal.Client.csproj @@ -3,7 +3,7 @@ net6.0-windows 9.0 - 1.12.0.0 + 1.13.0.0 enable diff --git a/Pal.Client/Plugin.cs b/Pal.Client/Plugin.cs index badd613..5a023c7 100644 --- a/Pal.Client/Plugin.cs +++ b/Pal.Client/Plugin.cs @@ -348,9 +348,12 @@ namespace Pal.Client if (TerritorySyncState == SyncState.Complete) { var markersToUpload = currentFloorMarkers.Where(x => x.IsPermanent() && x.NetworkId == null && !x.UploadRequested).ToList(); - foreach (var marker in markersToUpload) - marker.UploadRequested = true; - Task.Run(async () => await UploadMarkersForTerritory(LastTerritory, markersToUpload)); + if (markersToUpload.Count > 0) + { + foreach (var marker in markersToUpload) + marker.UploadRequested = true; + Task.Run(async () => await UploadMarkersForTerritory(LastTerritory, markersToUpload)); + } } }