This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -312,16 +312,16 @@ public ITask LockFile(string file)
312
312
{
313
313
var task = GitClient . Lock ( file ) ;
314
314
HookupHandlers ( task ) ;
315
- ListLocks ( false ) ;
316
- return task ;
315
+
316
+ return task . Then ( ListLocks ( false ) ) ;
317
317
}
318
318
319
319
public ITask UnlockFile ( string file , bool force )
320
320
{
321
321
var task = GitClient . Unlock ( file , force ) ;
322
322
HookupHandlers ( task ) . Schedule ( taskManager ) ;
323
- ListLocks ( false ) ;
324
- return task ;
323
+
324
+ return task . Then ( ListLocks ( false ) ) ;
325
325
}
326
326
327
327
private void LoadGitUser ( )
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ class ProjectWindowInterface : AssetPostprocessor
22
22
23
23
public static void Initialize ( IRepository repo )
24
24
{
25
+ Logger . Trace ( "Initialize HasRepository:{0}" , repo != null ) ;
26
+
25
27
EditorApplication . projectWindowItemOnGUI -= OnProjectWindowItemGUI ;
26
28
EditorApplication . projectWindowItemOnGUI += OnProjectWindowItemGUI ;
27
29
initialized = true ;
@@ -149,7 +151,9 @@ private static void Refresh()
149
151
private static void RunLocksUpdateOnMainThread ( IEnumerable < GitLock > update )
150
152
{
151
153
new ActionTask ( EntryPoint . ApplicationManager . TaskManager . Token , _ => OnLocksUpdate ( update ) )
152
- . ScheduleUI ( EntryPoint . ApplicationManager . TaskManager ) ;
154
+ {
155
+ Affinity = TaskAffinity . UI
156
+ } . Start ( ) ;
153
157
}
154
158
155
159
private static void OnLocksUpdate ( IEnumerable < GitLock > update )
@@ -169,11 +173,16 @@ private static void OnLocksUpdate(IEnumerable<GitLock> update)
169
173
var g = AssetDatabase . AssetPathToGUID ( assetPath ) ;
170
174
guidsLocks . Add ( g ) ;
171
175
}
176
+
177
+ EditorApplication . RepaintProjectWindow ( ) ;
172
178
}
173
179
174
180
private static void RunStatusUpdateOnMainThread ( GitStatus update )
175
181
{
176
- EntryPoint . ApplicationManager . TaskManager . ScheduleUI ( new ActionTask ( EntryPoint . ApplicationManager . TaskManager . Token , _ => OnStatusUpdate ( update ) ) ) ;
182
+ new ActionTask ( EntryPoint . ApplicationManager . TaskManager . Token , _ => OnStatusUpdate ( update ) )
183
+ {
184
+ Affinity = TaskAffinity . UI
185
+ } . Start ( ) ;
177
186
}
178
187
179
188
private static void OnStatusUpdate ( GitStatus update )
You can’t perform that action at this time.
0 commit comments