Skip to content

Commit

Permalink
fix: only logging clipboard content in debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostVaibhav committed Sep 18, 2024
1 parent ac7dcef commit 8cd6d7e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ internal static void SetClipboardTextContent(string text)
Thread.Sleep(50);
}

#if DEBUG
try
{
string clipContent = Clipboard.GetContent().GetTextAsync().GetAwaiter().GetResult();
Expand All @@ -42,6 +43,7 @@ internal static void SetClipboardTextContent(string text)
{
Logger.LogError("Failed to get clipboard content: ", ex.GetBaseException());
}
#endif

// TODO(stefan): For some reason Flush() fails from time to time when directly activated via hotkey.
// Calling inside a loop makes it work.
Expand Down

0 comments on commit 8cd6d7e

Please sign in to comment.