Browse Source

AsyncCall and pixiperfect

flabbet 1 year ago
parent
commit
95c9a9291d

BIN
src/PixiEditor.AvaloniaUI/Fonts/pixiperfect.ttf


+ 2 - 1
src/PixiEditor.Extensions.CommonApi/Async/AsyncCall.cs

@@ -10,7 +10,7 @@ public delegate void AsyncCallFailed(Exception exception);
 public class AsyncCall
 public class AsyncCall
 {
 {
     private object? _result;
     private object? _result;
-    private Action continuation;
+    protected Action continuation;
     public AsyncCallState State { get; protected set; } = AsyncCallState.Pending;
     public AsyncCallState State { get; protected set; } = AsyncCallState.Pending;
     public bool IsCompleted => State != AsyncCallState.Pending;
     public bool IsCompleted => State != AsyncCallState.Pending;
     public Exception? Exception { get; protected set; }
     public Exception? Exception { get; protected set; }
@@ -129,6 +129,7 @@ public class AsyncCall<TResult> : AsyncCall
         
         
         State = AsyncCallState.Completed;
         State = AsyncCallState.Completed;
         Result = result;
         Result = result;
+        continuation?.Invoke();
         Completed?.Invoke(result);
         Completed?.Invoke(result);
     }
     }