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

Commit ea5312b

Browse files
committed
Simplifying some code
1 parent 69e13c8 commit ea5312b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,15 @@ private static bool IsObjectUnlocked(Object selected)
162162
NPath repositoryPath = manager.Environment.GetRepositoryPath(assetPath);
163163

164164
var alreadyLocked = locks.Any(x => repositoryPath == x.Path);
165+
if (alreadyLocked)
166+
return false;
167+
165168
GitFileStatus status = GitFileStatus.None;
166169
if (entries != null)
167170
{
168171
status = entries.FirstOrDefault(x => repositoryPath == x.Path.ToNPath()).Status;
169172
}
170-
171-
return !alreadyLocked && status != GitFileStatus.Untracked && status != GitFileStatus.Ignored;
173+
return status != GitFileStatus.Untracked && status != GitFileStatus.Ignored;
172174
}
173175

174176
private static bool IsObjectLocked(Object selected)

0 commit comments

Comments
 (0)