Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit c057d99

Browse files
Merge branch 'fixes/changes-view-optimization' into features/lock-files-view
2 parents 62cbe4b + 41436c5 commit c057d99

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ChangesView.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,19 +259,26 @@ private void MaybeUpdateData()
259259
currentBranch = string.Format("[{0}]", Repository.CurrentBranchName);
260260
}
261261

262-
if (currentStatusEntriesHasUpdate || currentLocksHasUpdate)
262+
if (currentLocksHasUpdate)
263263
{
264-
currentStatusEntriesHasUpdate = false;
265-
currentLocksHasUpdate = false;
266-
267264
gitLocks = new HashSet<NPath>(Repository.CurrentLocks.Select(gitLock => gitLock.Path));
265+
}
266+
267+
if (currentStatusEntriesHasUpdate)
268+
{
268269
gitStatusEntries = Repository.CurrentChanges.Where(x => x.Status != GitFileStatus.Ignored).ToList();
269270

270271
changedFilesText = gitStatusEntries.Count == 0
271272
? NoChangedFilesLabel
272273
: gitStatusEntries.Count == 1
273274
? OneChangedFileLabel
274275
: String.Format(ChangedFilesLabel, gitStatusEntries.Count);
276+
}
277+
278+
if (currentStatusEntriesHasUpdate || currentLocksHasUpdate)
279+
{
280+
currentStatusEntriesHasUpdate = false;
281+
currentLocksHasUpdate = false;
275282

276283
BuildTree();
277284
}

0 commit comments

Comments
 (0)