Skip to content

Commit a9ae5b7

Browse files
committed
Do not show progress bar for asset indexing for projects without assets
1 parent 876c20c commit a9ae5b7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

resharper/resharper-unity/src/Feature/Caches/DeferredCacheController.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ private void ScheduleBackgroundActivity()
7676
myShellLocks.Dispatcher.AssertAccess();
7777
if (myCurrentBackgroundActivityLifetime.IsAlive)
7878
return;
79-
79+
80+
if (!HasDirtyFiles())
81+
{
82+
myCompletedOnce.Value = true;
83+
return;
84+
}
85+
8086
myCurrentBackgroundActivityLifetimeDefinition = new LifetimeDefinition(myLifetime);
8187
myCurrentBackgroundActivityLifetime = myCurrentBackgroundActivityLifetimeDefinition.Lifetime;
8288

resharper/resharper-unity/src/Feature/Caches/DeferredHelperCache.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ public void Merge(IPsiSourceFile sourceFile, object builtPart)
8282
public void Drop(IPsiSourceFile sourceFile)
8383
{
8484
DropFromProcess(sourceFile);
85-
FilesToDrop.Add(sourceFile);
85+
86+
bool isApplicable = myCaches.Any(t => t.IsApplicable(sourceFile));
87+
if (isApplicable)
88+
FilesToDrop.Add(sourceFile);
8689
}
8790

8891
public void OnPsiChange(ITreeNode elementContainingChanges, PsiChangedElementType type)

0 commit comments

Comments
 (0)