Skip to content

Commit

Permalink
Progress max percentage increase in stage 4 CS
Browse files Browse the repository at this point in the history
  • Loading branch information
bcssov committed Nov 27, 2023
1 parent af9a46a commit 22ff395
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/IronyModManager.Services/ModPatchCollectionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public virtual async Task<IConflictResult> FindConflictsAsync(IIndexedDefinition
}
}
processed++;
var perc = GetProgressPercentage(total, processed, 99.9);
var perc = GetProgressPercentage(total, processed, 99.99);
if (perc != previousProgress)
{
messageBus.Publish(new ModDefinitionAnalyzeEvent(perc));
Expand All @@ -471,7 +471,7 @@ public virtual async Task<IConflictResult> FindConflictsAsync(IIndexedDefinition
await EvalDefinitionsAsync(indexedDefinitions, localConflicts, definitions.OrderBy(p => modOrder.IndexOf(p.ModName)), modOrder, actualMode, localFileConflictCache, modShaConflictCache);
var progressMutex = await opLock.LockAsync();
processed += definitions.Count();
var perc = GetProgressPercentage(total, processed, 99.9);
var perc = GetProgressPercentage(total, processed, 99.99);
if (perc != previousProgress)
{
messageBus.Publish(new ModDefinitionAnalyzeEvent(perc));
Expand Down Expand Up @@ -509,7 +509,7 @@ public virtual async Task<IConflictResult> FindConflictsAsync(IIndexedDefinition
await EvalDefinitionsAsync(indexedDefinitions, localConflicts, definitions.OrderBy(p => modOrder.IndexOf(p.ModName)), modOrder, actualMode, localFileConflictCache, modShaConflictCache);
var progressMutex = await opLock.LockAsync();
processed += definitions.Count();
var perc = GetProgressPercentage(total, processed, 99.9);
var perc = GetProgressPercentage(total, processed, 99.99);
if (perc != previousProgress)
{
messageBus.Publish(new ModDefinitionAnalyzeEvent(perc));
Expand Down Expand Up @@ -573,7 +573,7 @@ public virtual async Task<IConflictResult> FindConflictsAsync(IIndexedDefinition
await indexedDefinitions.AddToMapAsync(copy);
conflicts.Add(copy);
processed++;
var perc = GetProgressPercentage(total, processed, 99.9);
var perc = GetProgressPercentage(total, processed, 99.99);
if (perc != previousProgress)
{
messageBus.Publish(new ModDefinitionAnalyzeEvent(perc));
Expand All @@ -585,7 +585,7 @@ public virtual async Task<IConflictResult> FindConflictsAsync(IIndexedDefinition
{
var mutex = await opLock.LockAsync();
processed++;
var perc = GetProgressPercentage(total, processed, 99.9);
var perc = GetProgressPercentage(total, processed, 99.99);
if (perc != previousProgress)
{
messageBus.Publish(new ModDefinitionAnalyzeEvent(perc));
Expand Down Expand Up @@ -670,7 +670,7 @@ public virtual async Task<IConflictResult> FindConflictsAsync(IIndexedDefinition
overwrittenDefs.Add(definition.TypeAndId, Tuple.Create(newDefinition, definitions, definition));
}
processed++;
var perc = GetProgressPercentage(total, processed, 99.9);
var perc = GetProgressPercentage(total, processed, 99.99);
if (perc != previousProgress)
{
messageBus.Publish(new ModDefinitionAnalyzeEvent(perc));
Expand Down Expand Up @@ -712,7 +712,7 @@ public virtual async Task<IConflictResult> FindConflictsAsync(IIndexedDefinition
}
var mutex = await opLock.LockAsync();
processed++;
var perc = GetProgressPercentage(total, processed, 99.9);
var perc = GetProgressPercentage(total, processed, 99.99);
if (perc != previousProgress)
{
messageBus.Publish(new ModDefinitionAnalyzeEvent(perc));
Expand All @@ -727,7 +727,7 @@ public virtual async Task<IConflictResult> FindConflictsAsync(IIndexedDefinition
Debug.WriteLine("FindConflictsAsync Overwritten Objects Sort Parse: " + stopWatch.Elapsed.FormatElapsed());
stopWatch.Restart();

messageBus.Publish(new ModDefinitionAnalyzeEvent(99.9));
messageBus.Publish(new ModDefinitionAnalyzeEvent(99.99));
var groupedConflicts = conflicts.GroupBy(p => p.TypeAndId);
var filteredConclicts = new List<IDefinition>();
foreach (var conflict in groupedConflicts.Where(p => p.Count() > 1))
Expand Down

0 comments on commit 22ff395

Please sign in to comment.