@@ -52,7 +52,7 @@ 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 += RepositoryManager_OnStatusUpdated ( ) ;
55
+ repositoryManager . OnStatusUpdated += RepositoryManager_OnStatusUpdated ;
56
56
repositoryManager . OnActiveBranchChanged += RepositoryManager_OnActiveBranchChanged ;
57
57
repositoryManager . OnActiveRemoteChanged += RepositoryManager_OnActiveRemoteChanged ;
58
58
}
@@ -121,15 +121,15 @@ private void SetCloneUrl()
121
121
OnRepositoryInfoChanged ? . Invoke ( ) ;
122
122
}
123
123
124
- private Action < GitStatus > RepositoryManager_OnStatusUpdated ( )
124
+ private void RepositoryManager_OnStatusUpdated ( GitStatus status )
125
125
{
126
- return status => CurrentStatus = status ;
126
+ CurrentStatus = status ;
127
+ OnStatusUpdated ? . Invoke ( CurrentStatus ) ;
127
128
}
128
129
129
130
private void RepositoryManager_OnActiveRemoteChanged ( ConfigRemote ? remote )
130
131
{
131
132
CurrentRemote = remote ;
132
- SetCloneUrl ( ) ;
133
133
OnActiveRemoteChanged ? . Invoke ( CurrentRemote . HasValue ? CurrentRemote . Value . Name : null ) ;
134
134
}
135
135
@@ -195,7 +195,6 @@ public ConfigBranch? CurrentBranch
195
195
{
196
196
currentBranch = value ;
197
197
Logger . Trace ( "OnActiveBranchChanged: {0}" , value ? . ToString ( ) ?? "NULL" ) ;
198
- OnActiveBranchChanged ? . Invoke ( currentBranch ? . Name ) ;
199
198
}
200
199
}
201
200
}
@@ -217,7 +216,7 @@ public ConfigRemote? CurrentRemote
217
216
{
218
217
currentRemote = value ;
219
218
Logger . Trace ( "OnActiveRemoteChanged: {0}" , value ? . ToString ( ) ?? "NULL" ) ;
220
- OnActiveRemoteChanged ? . Invoke ( value ? . Name ) ;
219
+ SetCloneUrl ( ) ;
221
220
}
222
221
}
223
222
}
@@ -249,7 +248,6 @@ public GitStatus CurrentStatus
249
248
{
250
249
Logger . Trace ( "OnStatusUpdated: {0}" , value . ToString ( ) ) ;
251
250
currentStatus = value ;
252
- OnStatusUpdated ? . Invoke ( value ) ;
253
251
}
254
252
}
255
253
0 commit comments