tisfeng / Easydict

一个简洁优雅的词典翻译 macOS App。开箱即用,支持离线 OCR 识别,支持有道词典,🍎 苹果系统词典,🍎 苹果系统翻译,OpenAI,Gemini,DeepL,Google,Bing,腾讯,百度,阿里,小牛,彩云和火山翻译。A concise and elegant Dictionary and Translator macOS App for looking up words and translating text.
GNU General Public License v3.0
6.45k stars 328 forks source link

Fix tips view blank #499

Closed AkaShark closed 1 month ago

AkaShark commented 3 months ago

close https://github.com/tisfeng/Easydict/issues/452

tisfeng commented 3 months ago

When OCR succeeded, it also displays a tips view 🥲

There are other similar scenes, and tips view also appear strangely, and it doesn't necessarily appear every time.

image
AkaShark commented 3 months ago

There are other similar scenes, and tips view also appear strangely, and it doesn't necessarily appear every time.

emm.. OCR I didn't handle more, do you think merging the https://github.com/tisfeng/Easydict/issues/478 into this PR.

tisfeng commented 3 months ago

No, I know, there's no need to change the way tips are displayed when OCR fails at the moment, but it shouldn't be showing the tips view when OCR right now, whether it succeeds or fails.

What I mean is that the current way of determining when the tips view appears is inappropriate, it can easily be triggered by mistake, not only for OCR, but even for selecting translation I've encountered this several times, but it doesn't happen every time, it‘s strange.

AkaShark commented 2 months ago

Please help me continue review this code

tisfeng commented 2 months ago

你们看看这个 PR,我先准备一下发布新版本。

Jerry23011 commented 2 months ago

记得我之前触发过提示view,不知道现在为什么没有了,我在高级里面并没有开“关闭提示视图”呀

截屏2024-04-27 18 29 38
AkaShark commented 2 months ago

记得我之前触发过提示view,不知道现在为什么没有了,我在高级里面并没有开“关闭提示视图”呀 截屏2024-04-27 18 29 38

现在的逻辑是只在滑词且滑词未空(nill不是空字符串)的情况才会触发的.

Jerry23011 commented 2 months ago

https://github.com/tisfeng/Easydict/assets/89069957/c26ef38f-38c6-4d0e-ab26-ca830c37a7d5

很奇怪,使我的打开方式不对吗

AkaShark commented 2 months ago

2024-04-27.19.01.27.mov 很奇怪,使我的打开方式不对吗

因为避免打扰现在触发的条件是滑词翻译的时候没有取到词采取弹出tips, 你这个视频看起来没有滑词为空呀 CleanShot 2024-04-28 at 10 45 32

Jerry23011 commented 2 months ago

https://github.com/tisfeng/Easydict/assets/89069957/7dec1e09-07e2-4257-bad6-6025fcc44cc5

我取词为空的时候这边看还是没有呀

AkaShark commented 2 months ago

2024-04-27.22.52.25.mov 我取词为空的时候这边看还是没有呀

让我瞅瞅的呀..

AkaShark commented 2 months ago

2024-04-27.22.52.25.mov 我取词为空的时候这边看还是没有呀

CleanShot 2024-04-28 at 22 15 10@2x 我还是没有复现。。。有啥特殊的触发条件不

Jerry23011 commented 2 months ago

可能是我macOS的问题,我回头开个虚拟机试试

AkaShark commented 2 months ago

可能是我macOS的问题,我回头开个虚拟机试试

Thank you. Please take all the time you need.

tisfeng commented 2 months ago

过几天将会发布一个小的修复版本,这个 PR 内容改动有点多,因此暂时先不合。

等发布修复版本后,我再来合并。

AkaShark commented 1 month ago

Please review it again

tisfeng commented 1 month ago

I improved some code, please review it and test carefully.

AkaShark commented 1 month ago

I hava no problems