fix: pystray setup callback signature (pystray passes icon as arg)

This commit is contained in:
zhang-pu 2026-11-02 12:05:17 +08:00
parent f479f4edf2
commit 2033a7cc1e

View file

@ -280,7 +280,10 @@ def main():
)
app.icon = icon
def _tick():
def _tick(icon_arg=None):
# pystray 会把 icon 作为参数传给 setup 回调
if icon_arg is not None:
icon_arg.visible = True
app.refresh()
return True