Skip to content

Commit

Permalink
#7073: Removed toast notification from silent OCR action
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaex committed Jul 19, 2024
1 parent b4f8fc2 commit 38a02cc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
18 changes: 0 additions & 18 deletions ShareX/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions ShareX/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -950,9 950,6 @@ Please run ShareX as administrator to change personal folder path.</value>
<data name="HotkeyManager_ShowFailedHotkeys_hotkey" xml:space="preserve">
<value>hotkey</value>
</data>
<data name="OCRForm_AutoCompleteFail" xml:space="preserve">
<value>Error occurred during OCR processing, or no text was returned.</value>
</data>
<data name="TaskHelpers_ToggleHotkeys_Hotkeys_enabled_" xml:space="preserve">
<value>Hotkeys enabled.</value>
</data>
Expand Down Expand Up @@ -1081,9 1078,6 @@ Middle click to close</value>
<data name="ClipboardContentViewer_ClipboardContentViewer_Load_Clipboard_is_empty_or_contains_unknown_data_" xml:space="preserve">
<value>Clipboard is empty or contains unknown data.</value>
</data>
<data name="OCRForm_AutoComplete" xml:space="preserve">
<value>The OCR output has been copied to your clipboard.</value>
</data>
<data name="ScreenshotDelay0S" xml:space="preserve">
<value>Screenshot delay: {0}s</value>
</data>
Expand Down
10 changes: 0 additions & 10 deletions ShareX/TaskHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1427,23 1427,13 @@ private static async Task AsyncOCRImage(Bitmap bmp, string filePath = null, Task
string textFilePath = Path.ChangeExtension(filePath, "txt");
File.WriteAllText(textFilePath, result, Encoding.UTF8);
}

if (!taskSettings.GeneralSettings.DisableNotifications && taskSettings.GeneralSettings.ShowToastNotificationAfterTaskCompleted)
{
ShowNotificationTip(Resources.OCRForm_AutoComplete);
}
}
else
{
Program.MainForm.InvokeSafe(() =>
{
ClipboardHelpers.Clear();
});

if (!taskSettings.GeneralSettings.DisableNotifications && taskSettings.GeneralSettings.ShowToastNotificationAfterTaskCompleted)
{
ShowNotificationTip(Resources.OCRForm_AutoCompleteFail);
}
}

PlayNotificationSoundAsync(NotificationSound.ActionCompleted, taskSettings);
Expand Down

0 comments on commit 38a02cc

Please sign in to comment.