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 +5
-3
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ class HistoryView : Subview
6161 [ SerializeField ] private ChangesetTreeView changesetTree = new ChangesetTreeView ( ) ;
6262 [ SerializeField ] private List < GitLogEntry > history = new List < GitLogEntry > ( ) ;
6363 [ SerializeField ] private bool isBusy ;
64+ [ SerializeField ] private string currentRemote ;
65+ [ SerializeField ] private bool isPublished ;
6466
6567 public override void InitializeView ( IView parent )
6668 {
@@ -222,6 +224,9 @@ private void OnLogUpdate(List<GitLogEntry> entries)
222224
223225 private void MaybeUpdateData ( )
224226 {
227+ isPublished = Repository . CurrentRemote . HasValue ;
228+ currentRemote = isPublished ? Repository . CurrentRemote . Value . Name : "placeholder" ;
229+
225230 if ( ! updated )
226231 return ;
227232 updated = false ;
@@ -345,11 +350,8 @@ public void OnEmbeddedGUI()
345350
346351 GUILayout . FlexibleSpace ( ) ;
347352
348-
349- var isPublished = Repository . CurrentRemote . HasValue ;
350353 if ( isPublished )
351354 {
352- var currentRemote = Repository . CurrentRemote . Value . Name ;
353355 GUI . enabled = currentRemote != null ;
354356 var fetchClicked = GUILayout . Button ( FetchButtonText , Styles . HistoryToolbarButtonStyle ) ;
355357 GUI . enabled = true ;
You can’t perform that action at this time.
0 commit comments