fix(SongMenu): 「下一首播放」的显示未按预期#997
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在修复歌曲菜单中「下一首播放」显示不准确的问题。此前,判断当前播放歌曲的逻辑存在缺陷,错误地将歌曲列表的索引与播放列表的索引进行比较。本次更改引入了一个新的辅助函数来准确比较歌曲对象,并更新了菜单的判断逻辑,从而确保了当前播放歌曲的正确识别和显示。 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull request overview
修复歌曲菜单中「下一首播放」的显示逻辑:不再用歌曲列表的 index 去和播放列表的 playIndex 比较,改为基于“当前播放歌曲”与“目标歌曲”是否为同一首来判断,从而避免显示不符合预期。
Changes:
- 新增
isSameSong辅助方法,用id/path判断两首歌是否相同 isCurrent判断从索引比较改为歌曲实体比较,影响「下一首播放」等菜单项的显示条件
You can also share your feedback on Copilot code review. Take the survey.
`index` 应该是歌曲在**歌曲列表**中的,而不是**播放列表**中的,这里却用这个 `index` 去和播放列表里的 `playIndex` 比较,是完全错误的
index应该是歌曲在歌曲列表中的,而不是播放列表中的,这里却用这个index去和播放列表里的playIndex比较,是完全错误的