This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ public void Initialize(IRepositoryManager repositoryManager)
52
52
repositoryManager . OnLocalBranchListChanged += RepositoryManager_OnLocalBranchListChanged ;
53
53
repositoryManager . OnCommitChanged += RepositoryManager_OnHeadChanged ;
54
54
repositoryManager . OnLocksUpdated += RepositoryManager_OnLocksUpdated ;
55
- repositoryManager . OnStatusUpdated += status => CurrentStatus = status ;
56
- repositoryManager . OnActiveBranchChanged += branch => CurrentBranch = branch ;
57
- repositoryManager . OnActiveRemoteChanged += remote => CurrentRemote = remote ;
55
+ repositoryManager . OnStatusUpdated += RepositoryManager_OnStatusUpdated ( ) ;
56
+ repositoryManager . OnActiveBranchChanged += RepositoryManager_OnActiveBranchChanged ;
57
+ repositoryManager . OnActiveRemoteChanged += RepositoryManager_OnActiveRemoteChanged ;
58
58
}
59
59
60
60
public void Refresh ( )
@@ -121,17 +121,22 @@ private void SetCloneUrl()
121
121
OnRepositoryInfoChanged ? . Invoke ( ) ;
122
122
}
123
123
124
+ private Action < GitStatus > RepositoryManager_OnStatusUpdated ( )
125
+ {
126
+ return status => CurrentStatus = status ;
127
+ }
128
+
124
129
private void RepositoryManager_OnActiveRemoteChanged ( ConfigRemote ? remote )
125
130
{
126
131
CurrentRemote = remote ;
127
132
SetCloneUrl ( ) ;
128
133
OnActiveRemoteChanged ? . Invoke ( CurrentRemote . HasValue ? CurrentRemote . Value . Name : null ) ;
129
134
}
130
135
131
- private void RepositoryManager_OnActiveBranchChanged ( string branch )
136
+ private void RepositoryManager_OnActiveBranchChanged ( ConfigBranch ? branch )
132
137
{
133
138
CurrentBranch = branch ;
134
- OnActiveBranchChanged ? . Invoke ( CurrentBranch ) ;
139
+ OnActiveBranchChanged ? . Invoke ( CurrentBranch . HasValue ? CurrentBranch . Value . Name : null ) ;
135
140
}
136
141
137
142
private void RepositoryManager_OnHeadChanged ( )
You can’t perform that action at this time.
0 commit comments