Procházet zdrojové kódy

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

sujith před 1 měsícem
rodič
revize
31d3bdf5c7

+ 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; });
             }
         }