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.88k stars 348 forks source link

🐞 反馈问题:开启自启动后,每次开机都会弹出「后台任务添加」 #403

Closed Lxnii closed 6 months ago

Lxnii commented 7 months ago

请先确认以下事项:

问题描述

开启开机启动后每次开机都会弹出「后台任务添加」提醒,2.5 版本并不会。

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

可重现

重现步骤

开启开机启动,每次重启

截图

Screenshot 2024-02-11 at 12 18 36

期望结果

不会重复提醒

解决方案(可选)

No response

设备型号 && 系统版本

M2 Pro, 14.3.1

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

tisfeng commented 7 months ago

开启开机启动后每次开机都会弹出「后台任务添加」提醒,2.5 版本并不会。

@NeverAgain11 请确认一下这个问题,可能是使用 Swift 重写导致。

NeverAgain11 commented 7 months ago

开启开机启动后每次开机都会弹出「后台任务添加」提醒,2.5 版本并不会。

@NeverAgain11 请确认一下这个问题,可能是使用 Swift 重写导致。

好,我看看

NeverAgain11 commented 7 months ago

@tisfeng We use Defaults to observe the change in the LaunchAtStart value, the oldValue will always return false when initialised, even if the value in UserDefault is true.

One solution is that we can remove the initial option, then it will be called when the value changes. Currently it is called both on app startup and on value change. I don't think it needs to be called on startup.

tisfeng commented 6 months ago

确实,启动时不需要调用这个方法,你修改试试。

tisfeng commented 6 months ago

2.6.1 版本已修复该问题。