fix non UI thread
MODIFY
src/TextCopy/Clipboard_GetUap.cs
src/TextCopy/Clipboard_GetUap.cs
@@ -14,13 +14,12 @@ namespace TextCopy
{
return async () =>
{
- var dataPackageView = UapClipboard.GetContent();
-
var dispatcher = CoreApplication.MainView.CoreWindow.Dispatcher;
string? value = null;
await dispatcher.RunAsync(CoreDispatcherPriority.Normal,
- async () => {
-
+ async () =>
+ {
+ var dataPackageView = UapClipboard.GetContent();
if (dataPackageView.Contains(StandardDataFormats.Text))
{
value = await dataPackageView.GetTextAsync();

fix non UI thread