@@ -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,8 @@ 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
+ Repository . CheckStatusEntriesChangedEvent ( lastStatusEntriesChangedEvent ) ;
48
45
}
49
46
50
47
public override void OnDisable ( )
@@ -108,7 +105,7 @@ private void RepositoryOnStatusEntriesChanged(CacheUpdateEvent cacheUpdateEvent)
108
105
if ( ! lastStatusEntriesChangedEvent . Equals ( cacheUpdateEvent ) )
109
106
{
110
107
lastStatusEntriesChangedEvent = cacheUpdateEvent ;
111
- currentStatusHasUpdate = true ;
108
+ currentStatusEntriesHasUpdate = true ;
112
109
Redraw ( ) ;
113
110
}
114
111
}
@@ -153,9 +150,9 @@ private void MaybeUpdateData()
153
150
currentBranch = string . Format ( "[{0}]" , Repository . CurrentBranchName ) ;
154
151
}
155
152
156
- if ( currentStatusHasUpdate )
153
+ if ( currentStatusEntriesHasUpdate )
157
154
{
158
- currentStatusHasUpdate = false ;
155
+ currentStatusEntriesHasUpdate = false ;
159
156
var entries = Repository . CurrentChanges ;
160
157
tree . UpdateEntries ( entries . Where ( x => x . Status != GitFileStatus . Ignored ) . ToList ( ) ) ;
161
158
}
0 commit comments