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

Commit a893f1b

Browse files
authored
Merge pull request #277 from github-for-unity/fixes/set-name-email-refresh-error
Fix to update user name and email correctly in SettingsView
2 parents 2235fb3 + 08abce5 commit a893f1b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,15 @@ private void OnUserSettingsGUI()
250250
{
251251
if (Repository != null)
252252
{
253-
Repository.User.Name = value;
253+
Repository.User.Name = newGitName;
254254
}
255255
else
256256
{
257257
if (cachedUser == null)
258258
{
259259
cachedUser = new User();
260260
}
261-
cachedUser.Name = value;
261+
cachedUser.Name = newGitName;
262262
}
263263
}
264264
})
@@ -270,13 +270,14 @@ private void OnUserSettingsGUI()
270270
{
271271
if (Repository != null)
272272
{
273-
Repository.User.Email = value;
273+
Repository.User.Email = newGitEmail;
274274
}
275275
else
276276
{
277-
cachedUser.Email = value;
278-
userDataHasChanged = true;
277+
cachedUser.Email = newGitEmail;
279278
}
279+
280+
userDataHasChanged = true;
280281
}
281282
}))
282283
.FinallyInUI((_, __) =>

0 commit comments

Comments
 (0)