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

Commit a9ec8d8

Browse files
Updating the ReleaseLock from the SettingsView
1 parent cc337c3 commit a9ec8d8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,19 @@ private void OnGitLfsLocksGUI()
295295
if (GUILayout.Button("Unlock"))
296296
{
297297
Repository.ReleaseLock(lck.Path, true)
298-
.Then(UsageTracker.IncrementSettingsViewButtonLfsUnlock)
298+
.FinallyInUI((success, ex) =>
299+
{
300+
if (success)
301+
{
302+
TaskManager.Run(UsageTracker.IncrementSettingsViewButtonLfsUnlock);
303+
}
304+
else
305+
{
306+
EditorUtility.DisplayDialog(Localization.ReleaseLockActionTitle,
307+
ex.Message,
308+
Localization.Ok);
309+
}
310+
})
299311
.Start();
300312
}
301313
}

0 commit comments

Comments
 (0)