Skip to content

Commit

Permalink
fix: sample items flash back when recognizing QR codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZGGSONG committed Sep 18, 2024
1 parent d41338a commit 1eb945f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/STranslate/ViewModels/Preference/OCR/WeChatOCR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ public async Task<OcrResult> ExecuteAsync(byte[] bytes, LangEnum lang, Cancellat
var ocrResult = new OcrResult();
var list = result?.OcrResult?.SingleResult;
if (list == null)
{
//避免重复set
tcs.SetResult(OcrResult.Fail("WeChatOCR get result is null"));
return;
}
for (var i = 0; i < list?.Count; i++)
{
Expand Down

0 comments on commit 1eb945f

Please sign in to comment.