@@ -45,6 +45,7 @@ public sealed class GitHubPaneViewModel : ViewModelBase, IGitHubPaneViewModel, I
4545 readonly ILoggedOutViewModel loggedOut ;
4646 readonly INotAGitHubRepositoryViewModel notAGitHubRepository ;
4747 readonly INotAGitRepositoryViewModel notAGitRepository ;
48+ readonly INoRemoteOriginViewModel noRemoteOrigin ;
4849 readonly ILoginFailedViewModel loginFailed ;
4950 readonly SemaphoreSlim navigating = new SemaphoreSlim ( 1 ) ;
5051 readonly ObservableAsPropertyHelper < ContentOverride > contentOverride ;
@@ -72,6 +73,7 @@ public GitHubPaneViewModel(
7273 ILoggedOutViewModel loggedOut ,
7374 INotAGitHubRepositoryViewModel notAGitHubRepository ,
7475 INotAGitRepositoryViewModel notAGitRepository ,
76+ INoRemoteOriginViewModel noRemoteOrigin ,
7577 ILoginFailedViewModel loginFailed )
7678 {
7779 Guard . ArgumentNotNull ( viewModelFactory , nameof ( viewModelFactory ) ) ;
@@ -84,6 +86,7 @@ public GitHubPaneViewModel(
8486 Guard . ArgumentNotNull ( loggedOut , nameof ( loggedOut ) ) ;
8587 Guard . ArgumentNotNull ( notAGitHubRepository , nameof ( notAGitHubRepository ) ) ;
8688 Guard . ArgumentNotNull ( notAGitRepository , nameof ( notAGitRepository ) ) ;
89+ Guard . ArgumentNotNull ( noRemoteOrigin , nameof ( noRemoteOrigin ) ) ;
8790 Guard . ArgumentNotNull ( loginFailed , nameof ( loginFailed ) ) ;
8891
8992 this . viewModelFactory = viewModelFactory ;
@@ -94,6 +97,7 @@ public GitHubPaneViewModel(
9497 this . loggedOut = loggedOut ;
9598 this . notAGitHubRepository = notAGitHubRepository ;
9699 this . notAGitRepository = notAGitRepository ;
100+ this . noRemoteOrigin = noRemoteOrigin ;
97101 this . loginFailed = loginFailed ;
98102
99103 var contentAndNavigatorContent = Observable . CombineLatest (
@@ -433,8 +437,17 @@ async Task UpdateContent(LocalRepositoryModel repository)
433437 }
434438 else if ( string . IsNullOrWhiteSpace ( repository . CloneUrl ) )
435439 {
436- log . Debug ( "Not a GitHub repository: {CloneUrl}" , repository ? . CloneUrl ) ;
437- Content = notAGitHubRepository ;
440+ if ( repository . HasRemotesButNoOrigin )
441+ {
442+ log . Debug ( "No origin remote" ) ;
443+ Content = noRemoteOrigin ;
444+ }
445+ else
446+ {
447+ log . Debug ( "Not a GitHub repository: {CloneUrl}" , repository ? . CloneUrl ) ;
448+ Content = notAGitHubRepository ;
449+ }
450+
438451 return ;
439452 }
440453
@@ -490,7 +503,7 @@ async Task UpdateContent(LocalRepositoryModel repository)
490503 Content = loggedOut ;
491504 }
492505 }
493-
506+
494507 if ( notGitHubRepo )
495508 {
496509 log . Debug ( "Not a GitHub repository: {CloneUrl}" , repository ? . CloneUrl ) ;
0 commit comments