From 138f94594f1c314784201105154c7d200d42a4c2 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Mon, 9 May 2022 21:31:21 -0600 Subject: [PATCH] Fixed cross-thread access error. --- Source/LibationWinForms/Form1.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/LibationWinForms/Form1.cs b/Source/LibationWinForms/Form1.cs index dac6d01a..b0d26cf1 100644 --- a/Source/LibationWinForms/Form1.cs +++ b/Source/LibationWinForms/Form1.cs @@ -262,8 +262,8 @@ namespace LibationWinForms .Where(a => a.LibraryScan) .ToArray(); - // in autoScan, new books SHALL NOT show dialog - await LibraryCommands.ImportAccountAsync(Login.WinformLoginChoiceEager.ApiExtendedFunc, accounts); + // in autoScan, new books SHALL NOT show dialog + await Invoke(async () => await LibraryCommands.ImportAccountAsync(Login.WinformLoginChoiceEager.ApiExtendedFunc, accounts)); }; // load init state to menu checkbox