Fix feedback loop

This commit is contained in:
Liza 2022-10-31 19:27:54 +01:00
parent c2bf2ddc43
commit 5e311a4015
2 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<LangVersion>9.0</LangVersion>
<Version>1.12.0.0</Version>
<Version>1.13.0.0</Version>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -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));
}
}
}