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
61
61
[ SerializeField ] private ChangesetTreeView changesetTree = new ChangesetTreeView ( ) ;
62
62
[ SerializeField ] private List < GitLogEntry > history = new List < GitLogEntry > ( ) ;
63
63
[ SerializeField ] private bool isBusy ;
64
+ [ SerializeField ] private string currentRemote ;
65
+ [ SerializeField ] private bool isPublished ;
64
66
65
67
public override void InitializeView ( IView parent )
66
68
{
@@ -222,6 +224,9 @@ private void OnLogUpdate(List<GitLogEntry> entries)
222
224
223
225
private void MaybeUpdateData ( )
224
226
{
227
+ isPublished = Repository . CurrentRemote . HasValue ;
228
+ currentRemote = isPublished ? Repository . CurrentRemote . Value . Name : "placeholder" ;
229
+
225
230
if ( ! updated )
226
231
return ;
227
232
updated = false ;
@@ -345,11 +350,8 @@ public void OnEmbeddedGUI()
345
350
346
351
GUILayout . FlexibleSpace ( ) ;
347
352
348
-
349
- var isPublished = Repository . CurrentRemote . HasValue ;
350
353
if ( isPublished )
351
354
{
352
- var currentRemote = Repository . CurrentRemote . Value . Name ;
353
355
GUI . enabled = currentRemote != null ;
354
356
var fetchClicked = GUILayout . Button ( FetchButtonText , Styles . HistoryToolbarButtonStyle ) ;
355
357
GUI . enabled = true ;
You can’t perform that action at this time.
0 commit comments