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)
312312 {
313313 var task = GitClient . Lock ( file ) ;
314314 HookupHandlers ( task ) ;
315- ListLocks ( false ) ;
316- return task ;
315+
316+ return task . Then ( ListLocks ( false ) ) ;
317317 }
318318
319319 public ITask UnlockFile ( string file , bool force )
320320 {
321321 var task = GitClient . Unlock ( file , force ) ;
322322 HookupHandlers ( task ) . Schedule ( taskManager ) ;
323- ListLocks ( false ) ;
324- return task ;
323+
324+ return task . Then ( ListLocks ( false ) ) ;
325325 }
326326
327327 private void LoadGitUser ( )
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ class ProjectWindowInterface : AssetPostprocessor
2222
2323 public static void Initialize ( IRepository repo )
2424 {
25+ Logger . Trace ( "Initialize HasRepository:{0}" , repo != null ) ;
26+
2527 EditorApplication . projectWindowItemOnGUI -= OnProjectWindowItemGUI ;
2628 EditorApplication . projectWindowItemOnGUI += OnProjectWindowItemGUI ;
2729 initialized = true ;
@@ -149,7 +151,9 @@ private static void Refresh()
149151 private static void RunLocksUpdateOnMainThread ( IEnumerable < GitLock > update )
150152 {
151153 new ActionTask ( EntryPoint . ApplicationManager . TaskManager . Token , _ => OnLocksUpdate ( update ) )
152- . ScheduleUI ( EntryPoint . ApplicationManager . TaskManager ) ;
154+ {
155+ Affinity = TaskAffinity . UI
156+ } . Start ( ) ;
153157 }
154158
155159 private static void OnLocksUpdate ( IEnumerable < GitLock > update )
@@ -169,11 +173,16 @@ private static void OnLocksUpdate(IEnumerable<GitLock> update)
169173 var g = AssetDatabase . AssetPathToGUID ( assetPath ) ;
170174 guidsLocks . Add ( g ) ;
171175 }
176+
177+ EditorApplication . RepaintProjectWindow ( ) ;
172178 }
173179
174180 private static void RunStatusUpdateOnMainThread ( GitStatus update )
175181 {
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 ( ) ;
177186 }
178187
179188 private static void OnStatusUpdate ( GitStatus update )
You can’t perform that action at this time.
0 commit comments