@@ -18,7 +18,7 @@ class ChangesView : Subview
1818 private const string NoChangedFilesLabel = "No changed files" ;
1919
2020 [ NonSerialized ] private bool currentBranchHasUpdate ;
21- [ NonSerialized ] private bool currentStatusHasUpdate ;
21+ [ NonSerialized ] private bool currentStatusEntriesHasUpdate ;
2222 [ NonSerialized ] private bool isBusy ;
2323
2424 [ SerializeField ] private string commitBody = "" ;
@@ -40,11 +40,8 @@ public override void OnEnable()
4040 base . OnEnable ( ) ;
4141 AttachHandlers ( Repository ) ;
4242
43- if ( Repository != null )
44- {
45- Repository . CheckCurrentBranchChangedEvent ( lastCurrentBranchChangedEvent ) ;
46- Repository . CheckStatusEntriesChangedEvent ( lastStatusEntriesChangedEvent ) ;
47- }
43+ Repository . CheckCurrentBranchChangedEvent ( lastCurrentBranchChangedEvent ) ;
44+ Repository . CheckStatusEntriesChangedEvent ( lastStatusEntriesChangedEvent ) ;
4845 }
4946
5047 public override void OnDisable ( )
@@ -108,7 +105,7 @@ private void RepositoryOnStatusEntriesChanged(CacheUpdateEvent cacheUpdateEvent)
108105 if ( ! lastStatusEntriesChangedEvent . Equals ( cacheUpdateEvent ) )
109106 {
110107 lastStatusEntriesChangedEvent = cacheUpdateEvent ;
111- currentStatusHasUpdate = true ;
108+ currentStatusEntriesHasUpdate = true ;
112109 Redraw ( ) ;
113110 }
114111 }
@@ -153,9 +150,9 @@ private void MaybeUpdateData()
153150 currentBranch = string . Format ( "[{0}]" , Repository . CurrentBranchName ) ;
154151 }
155152
156- if ( currentStatusHasUpdate )
153+ if ( currentStatusEntriesHasUpdate )
157154 {
158- currentStatusHasUpdate = false ;
155+ currentStatusEntriesHasUpdate = false ;
159156 var entries = Repository . CurrentChanges ;
160157 tree . UpdateEntries ( entries . Where ( x => x . Status != GitFileStatus . Ignored ) . ToList ( ) ) ;
161158 }
0 commit comments