@@ -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,9 @@ 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+
45+ currentStatusEntriesHasUpdate = true ;
4846 }
4947
5048 public override void OnDisable ( )
@@ -108,7 +106,7 @@ private void RepositoryOnStatusEntriesChanged(CacheUpdateEvent cacheUpdateEvent)
108106 if ( ! lastStatusEntriesChangedEvent . Equals ( cacheUpdateEvent ) )
109107 {
110108 lastStatusEntriesChangedEvent = cacheUpdateEvent ;
111- currentStatusHasUpdate = true ;
109+ currentStatusEntriesHasUpdate = true ;
112110 Redraw ( ) ;
113111 }
114112 }
@@ -153,9 +151,9 @@ private void MaybeUpdateData()
153151 currentBranch = string . Format ( "[{0}]" , Repository . CurrentBranchName ) ;
154152 }
155153
156- if ( currentStatusHasUpdate )
154+ if ( currentStatusEntriesHasUpdate )
157155 {
158- currentStatusHasUpdate = false ;
156+ currentStatusEntriesHasUpdate = false ;
159157 var entries = Repository . CurrentChanges ;
160158 tree . UpdateEntries ( entries . Where ( x => x . Status != GitFileStatus . Ignored ) . ToList ( ) ) ;
161159 }
0 commit comments