-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fixed #627: Project recently published to remote pre-fills local name for new project #664
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found some white space issues
var view = new GitHubInvitationContent(); | ||
SectionContent = view; | ||
view.DataContext = this; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should be spaces not tabs
@@ -77,7 +82,8 @@ protected override void RepoChanged(bool changed) | |||
{ | |||
base.RepoChanged(changed); | |||
Setup(); | |||
} | |||
InitializeSectionView(); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above these should be spaces not tabs.
Changed indentation from tabs to spaces
if (!string.IsNullOrEmpty(activeRepository?.Info?.WorkingDirectory)) | ||
return new DirectoryInfo(activeRepository.Info.WorkingDirectory).Name ?? ""; | ||
if (!string.IsNullOrEmpty(vsGitServices.GetActiveRepo()?.Info?.WorkingDirectory)) | ||
return new DirectoryInfo(vsGitServices.GetActiveRepo().Info.WorkingDirectory).Name ?? ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetActiveRepo
is a somewhat heavy operation, so it's probably best to cache the value here to avoid the double hit on it.
This is awesome stuff, thank you! I just had a little comment about the performance of the property getter, otherwise it's great! ✨ |
…Studio into NamePrefillForNewProject
Hi @jswietek - due to some recent changes we had to make for VS2017 this is now failing for me because this line: https://github.com/github/VisualStudio/pull/664/files#diff-a1cf7690606825b92e0c421049f01872R43 Is being called on a background thread, and it ends up invoking |
2 main changes:
RepositoryPublishService now has a reference to VSGitService. This is used to call GetActiveRepo() everytime when needed instead of getting that value in constructor. This is needed as active repo may change and the reference was never updated in the RepositoryPublishService
GitHubPublishSection.cs now re-initialize the section view when active repo changes.
Fixes #627