Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

切换到 SwiftUI App 模式,服务中各种翻译模型的选中状态不稳定 #423

Closed
5 of 6 tasks
KrabsWong opened this issue Feb 24, 2024 · 3 comments
Closed
5 of 6 tasks
Assignees
Labels
bug Something isn't working fixed in next release The issue will be closed once next release is available

Comments

@KrabsWong
Copy link

KrabsWong commented Feb 24, 2024

请先确认以下事项:

  • 请务必查看 常见问题
  • 已仔细阅读了 README
  • issues 页面搜索过问题(包括已关闭的 issue),但未能找到解决方法
  • Easydict 已升级到 最新版本
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述

勾选不同的翻译服务之后,设置窗口失去焦点,再重新获得焦点之后,翻译服务的选中状态异常。
EasyDict 是 2.6.0 版本

该问题是否可以稳定重现?

不可稳定重现

重现步骤

暂时还没能找到稳定重现的路径,但是又没找到什么规律。

  1. 以 SwiftUI App 模式起动之后,切换到“服务”。
  2. 勾选有道,OpenAI翻译,Gemini翻译(因为 Gemini 翻译是在最下边,需要稍微滚动下。)
  3. 选中 OpenAI,准备设置相关的 key 等信息
  4. 点击设置窗口之外,让设置窗口失去焦点
  5. 重新点击设置页面(比如点击整个设置页面的标题部分)
  6. 这时候一定几率会发现,选中的 OpenAI 翻译那一行的开关是灰色的(失去焦点效果,但是依然保持选中状态),底部 gemini 变成了未选中状态

第6步的表现,没办法稳定重现,有时候是完全正常,有时候是 6 的表现,有时候又会是 gemini 选中+失去焦点的状态。

截图

image

期望结果

选中状态保持正常,设置窗口失去焦点/获得焦点之后,相关的配置项展示正确

解决方案(可选)

No response

设备型号 && 系统版本

Apple M1 Pro, macOS 14.2.1

是否愿意提交 PR 解决该问题?

  • 我愿意提交 PR
@KrabsWong KrabsWong added the bug Something isn't working label Feb 24, 2024
@KrabsWong KrabsWong changed the title 切换到 swiftUI App 模式,服务中各种翻译模型的选中状态不稳定 切换到 SwiftUI App 模式,服务中各种翻译模型的选中状态不稳定 Feb 24, 2024
@tisfeng
Copy link
Owner

tisfeng commented Feb 24, 2024

@phlpsong 看一下这个问题

@phlpsong
Copy link
Collaborator

Yes, the easiest way to reproduce this is to toggle the service state and move focus to another app, then switch focus back, and the enable state revert.

@tisfeng tisfeng added the fixed in next release The issue will be closed once next release is available label Feb 25, 2024
@tisfeng
Copy link
Owner

tisfeng commented Feb 25, 2024

2.6.1 版本已修复该问题。

@tisfeng tisfeng closed this as completed Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next release The issue will be closed once next release is available
Projects
None yet
Development

No branches or pull requests

3 participants