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

fix: repeat initialization #187

Merged
merged 1 commit into from
Mar 3, 2025
Merged

fix: repeat initialization #187

merged 1 commit into from
Mar 3, 2025

Conversation

dyphire
Copy link
Collaborator

@dyphire dyphire commented Mar 3, 2025

按钮设置在 init() 调用的各个函数中会自动执行,无需提前设置,反而导致重复调用 init()

@dyphire dyphire marked this pull request as draft March 3, 2025 09:51
@dyphire
Copy link
Collaborator Author

dyphire commented Mar 3, 2025

和我一开始以为的不同,设置按钮并不会导致重复调用。真正的重复调用发生在 addon_danmaku() 中,但好像不太好处理, @Tony15246 有什么想法吗?有必要对此进行处理吗

@Tony15246
Copy link
Owner

和我一开始以为的不同,设置按钮并不会导致重复调用。真正的重复调用发生在 addon_danmaku() 中,但好像不太好处理, @Tony15246 有什么想法吗?有必要对此进行处理吗

我没看出来addon_danmaku()是如何导致init()被重复调用的🥲

@dyphire dyphire marked this pull request as ready for review March 3, 2025 10:47
@dyphire
Copy link
Collaborator Author

dyphire commented Mar 3, 2025

和我一开始以为的不同,设置按钮并不会导致重复调用。真正的重复调用发生在 addon_danmaku() 中,但好像不太好处理, @Tony15246 有什么想法吗?有必要对此进行处理吗

我没看出来addon_danmaku()是如何导致init()被重复调用的🥲

我表达的不够清楚,我是在测试电影电视弹幕加载时发现有时会重复输出弹幕加载消息,查看了下代码以为是设置按钮时重复调用 init() 导致的。但经过测试排查发现其实不是,是 addon_danmaku() 重复解析了一遍弹幕 url

已修复

Copy link
Owner

@Tony15246 Tony15246 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Tony15246 Tony15246 merged commit e7e1488 into Tony15246:main Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants