Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit cc41b22

Browse files
The relevant data is updated in RepositoryInfoCache not BranchCache
1 parent 1d15704 commit cc41b22

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/HistoryView.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class HistoryView : Subview
5151
[SerializeField] private bool hasRemote;
5252
[SerializeField] private bool hasItemsToCommit;
5353

54-
[SerializeField] private CacheUpdateEvent branchUpdateEvent;
55-
[NonSerialized] private bool branchCacheHasUpdate;
54+
[SerializeField] private CacheUpdateEvent repositoryInfoUpdateEvent;
55+
[NonSerialized] private bool repositoryInfoHasUpdate;
5656

5757
[SerializeField] private CacheUpdateEvent gitStatusUpdateEvent;
5858
[NonSerialized] private bool gitStatusCacheHasUpdate;
@@ -79,7 +79,7 @@ public override void OnEnable()
7979
{
8080
Repository.CheckGitLogCacheEvent(gitLogCacheUpdateEvent);
8181
Repository.CheckGitStatusCacheEvent(gitStatusUpdateEvent);
82-
Repository.CheckBranchCacheEvent(branchUpdateEvent);
82+
Repository.CheckRepositoryInfoCacheEvent(repositoryInfoUpdateEvent);
8383
}
8484
}
8585

@@ -128,14 +128,14 @@ private void Repository_GitLogCacheUpdated(CacheUpdateEvent cacheUpdateEvent)
128128
}
129129
}
130130

131-
private void Repository_BranchCacheUpdated(CacheUpdateEvent cacheUpdateEvent)
131+
private void Repository_RepositoryInfoCacheUpdated(CacheUpdateEvent cacheUpdateEvent)
132132
{
133-
if (!branchUpdateEvent.Equals(cacheUpdateEvent))
133+
if (!repositoryInfoUpdateEvent.Equals(cacheUpdateEvent))
134134
{
135135
new ActionTask(TaskManager.Token, () =>
136136
{
137-
branchUpdateEvent = cacheUpdateEvent;
138-
branchCacheHasUpdate = true;
137+
repositoryInfoUpdateEvent = cacheUpdateEvent;
138+
repositoryInfoHasUpdate = true;
139139
Redraw();
140140
})
141141
{ Affinity = TaskAffinity.UI }.Start();
@@ -149,7 +149,7 @@ private void AttachHandlers(IRepository repository)
149149

150150
repository.GitStatusCacheUpdated += Repository_GitStatusCacheUpdated;
151151
repository.GitLogCacheUpdated += Repository_GitLogCacheUpdated;
152-
repository.BranchCacheUpdated += Repository_BranchCacheUpdated;
152+
repository.RepositoryInfoCacheUpdated += Repository_RepositoryInfoCacheUpdated;
153153
}
154154

155155
private void DetachHandlers(IRepository repository)
@@ -159,17 +159,17 @@ private void DetachHandlers(IRepository repository)
159159

160160
repository.GitStatusCacheUpdated -= Repository_GitStatusCacheUpdated;
161161
repository.GitLogCacheUpdated -= Repository_GitLogCacheUpdated;
162-
repository.BranchCacheUpdated -= Repository_BranchCacheUpdated;
162+
repository.RepositoryInfoCacheUpdated -= Repository_RepositoryInfoCacheUpdated;
163163
}
164164

165165
private void MaybeUpdateData()
166166
{
167167
if (Repository == null)
168168
return;
169169

170-
if (branchCacheHasUpdate)
170+
if (repositoryInfoHasUpdate)
171171
{
172-
branchCacheHasUpdate = false;
172+
repositoryInfoHasUpdate = false;
173173

174174
var currentRemote = Repository.CurrentRemote;
175175
hasRemote = currentRemote.HasValue;

0 commit comments

Comments
 (0)