@@ -109,19 +109,7 @@ public override void OnDataUpdate()
109
109
{
110
110
base . OnDataUpdate ( ) ;
111
111
112
- string repoRemote = null ;
113
- if ( MaybeUpdateData ( out repoRemote ) )
114
- {
115
- repoBranchContent = new GUIContent ( repoBranch , Window_RepoBranchTooltip ) ;
116
- if ( repoUrl != null )
117
- {
118
- repoUrlContent = new GUIContent ( repoUrl , string . Format ( Window_RepoUrlTooltip , repoRemote ) ) ;
119
- }
120
- else
121
- {
122
- repoUrlContent = new GUIContent ( repoUrl , Window_RepoNoUrlTooltip ) ;
123
- }
124
- }
112
+ MaybeUpdateData ( ) ;
125
113
126
114
if ( ActiveView != null )
127
115
ActiveView . OnDataUpdate ( ) ;
@@ -198,10 +186,10 @@ private void RefreshOnMainThread()
198
186
new ActionTask ( TaskManager . Token , Refresh ) { Affinity = TaskAffinity . UI } . Start ( ) ;
199
187
}
200
188
201
- private bool MaybeUpdateData ( out string repoRemote )
189
+ private void MaybeUpdateData ( )
202
190
{
203
- repoRemote = null ;
204
- bool repoDataChanged = false ;
191
+ string repoRemote = null ;
192
+ var repoDataChanged = false ;
205
193
if ( Repository != null )
206
194
{
207
195
var currentBranchString = ( Repository . CurrentBranch . HasValue ? Repository . CurrentBranch . Value . Name : null ) ;
@@ -236,7 +224,18 @@ private bool MaybeUpdateData(out string repoRemote)
236
224
}
237
225
}
238
226
239
- return repoDataChanged ;
227
+ if ( repoDataChanged )
228
+ {
229
+ repoBranchContent = new GUIContent ( repoBranch , Window_RepoBranchTooltip ) ;
230
+ if ( repoUrl != null )
231
+ {
232
+ repoUrlContent = new GUIContent ( repoUrl , string . Format ( Window_RepoUrlTooltip , repoRemote ) ) ;
233
+ }
234
+ else
235
+ {
236
+ repoUrlContent = new GUIContent ( repoUrl , Window_RepoNoUrlTooltip ) ;
237
+ }
238
+ }
240
239
}
241
240
242
241
private void AttachHandlers ( IRepository repository )
0 commit comments