Browse Source

Sujith :) ->
1. Asset refresh as soon as switch branch was successful

sujith 1 month ago
parent
commit
31d3bdf5c7
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Assets/Arbitrator/Editor/GUI/ArbitratorController.cs

+ 4 - 2
Assets/Arbitrator/Editor/GUI/ArbitratorController.cs

@@ -306,7 +306,8 @@ namespace Terra.Arbitrator.GUI
                 StartOperation($"Discarding changes and switching to {targetBranch}...");
                 GitService.ResetAndSwitchBranch(targetBranch)
                     .Then(successMsg => { InfoMessage = successMsg; Refresh(); })
-                    .Catch(ex => { HandleOperationError(ex); FinishOperation(); });
+                    .Catch(ex => { HandleOperationError(ex); FinishOperation(); })
+                    .Finally(() => { EditorApplication.delayCall += AssetDatabase.Refresh; });
             }
             else
             {
@@ -318,7 +319,8 @@ namespace Terra.Arbitrator.GUI
                 StartOperation($"Switching to {targetBranch}...");
                 GitService.SwitchBranch(targetBranch)
                     .Then(successMsg => { InfoMessage = successMsg; Refresh(); })
-                    .Catch(ex => { HandleOperationError(ex); FinishOperation(); });
+                    .Catch(ex => { HandleOperationError(ex); FinishOperation(); })
+                    .Finally(() => { EditorApplication.delayCall += AssetDatabase.Refresh; });
             }
         }