From f0c7f2f7e42a10c5de044ea8f4a92d12f7456a80 Mon Sep 17 00:00:00 2001 From: rampaa Date: Wed, 9 Oct 2024 01:40:31 +0300 Subject: [PATCH] Minor --- JL.Windows/GUI/MainWindow.xaml.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/JL.Windows/GUI/MainWindow.xaml.cs b/JL.Windows/GUI/MainWindow.xaml.cs index 3e4c788b..640b7755 100644 --- a/JL.Windows/GUI/MainWindow.xaml.cs +++ b/JL.Windows/GUI/MainWindow.xaml.cs @@ -124,15 +124,11 @@ protected override async void OnSourceInitialized(EventArgs e) private async Task CopyFromClipboard() { - bool gotTextFromClipboard = false; - while (Clipboard.ContainsText() && !gotTextFromClipboard) + while (Clipboard.ContainsText()) { try { - string text = Clipboard.GetText(); - gotTextFromClipboard = true; - - return CopyText(text); + return CopyText(Clipboard.GetText()); } catch (ExternalException ex) {