@@ -18,7 +18,7 @@ class ChangesView : Subview
18
18
private const string NoChangedFilesLabel = "No changed files" ;
19
19
20
20
[ NonSerialized ] private bool currentBranchHasUpdate ;
21
- [ NonSerialized ] private bool currentStatusHasUpdate ;
21
+ [ NonSerialized ] private bool currentStatusEntriesHasUpdate ;
22
22
[ NonSerialized ] private bool isBusy ;
23
23
24
24
[ SerializeField ] private string commitBody = "" ;
@@ -40,11 +40,9 @@ public override void OnEnable()
40
40
base . OnEnable ( ) ;
41
41
AttachHandlers ( Repository ) ;
42
42
43
- if ( Repository != null )
44
- {
45
- Repository . CheckCurrentBranchChangedEvent ( lastCurrentBranchChangedEvent ) ;
46
- Repository . CheckStatusEntriesChangedEvent ( lastStatusEntriesChangedEvent ) ;
47
- }
43
+ Repository . CheckCurrentBranchChangedEvent ( lastCurrentBranchChangedEvent ) ;
44
+
45
+ currentStatusEntriesHasUpdate = true ;
48
46
}
49
47
50
48
public override void OnDisable ( )
@@ -108,7 +106,7 @@ private void RepositoryOnStatusEntriesChanged(CacheUpdateEvent cacheUpdateEvent)
108
106
if ( ! lastStatusEntriesChangedEvent . Equals ( cacheUpdateEvent ) )
109
107
{
110
108
lastStatusEntriesChangedEvent = cacheUpdateEvent ;
111
- currentStatusHasUpdate = true ;
109
+ currentStatusEntriesHasUpdate = true ;
112
110
Redraw ( ) ;
113
111
}
114
112
}
@@ -153,9 +151,9 @@ private void MaybeUpdateData()
153
151
currentBranch = string . Format ( "[{0}]" , Repository . CurrentBranchName ) ;
154
152
}
155
153
156
- if ( currentStatusHasUpdate )
154
+ if ( currentStatusEntriesHasUpdate )
157
155
{
158
- currentStatusHasUpdate = false ;
156
+ currentStatusEntriesHasUpdate = false ;
159
157
var entries = Repository . CurrentChanges ;
160
158
tree . UpdateEntries ( entries . Where ( x => x . Status != GitFileStatus . Ignored ) . ToList ( ) ) ;
161
159
}
0 commit comments