Преглед на файлове

avalonia: Little task tweak to DigitalFormDocumentFactory

Kenric Nugteren преди 1 седмица
родител
ревизия
3ef4fe2e8c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      InABox.Core/DigitalForms/DigitalFormDocumentFactory.cs

+ 1 - 1
InABox.Core/DigitalForms/DigitalFormDocumentFactory.cs

@@ -143,7 +143,7 @@ namespace InABox.Core
         public static void Stop() => _handler?.Stop();
 
         public static void LoadDocument(Guid id, Action<byte[]> callback) =>
-            LoadDocumentAsync(id).ContinueWith(task => callback(task.Result));
+            LoadDocumentAsync(id).ContinueWith(task => callback(task.Result), TaskScheduler.FromCurrentSynchronizationContext());
         public static Task<byte[]> LoadDocumentAsync(Guid id) => Handler.LoadDocumentAsync(id);
         public static byte[]? LoadDocument(Guid id) => Handler.LoadDocument(id);
         public static Guid SaveDocument(byte[] data) => Handler.SaveDocument(data);