Skip to content

fix: 修复播放器展开状态被意外持久化,顺便小改相关的地方 - #119

Merged
imsyy merged 2 commits into
SPlayer-Dev:devfrom
MoYingJi:pr/fix/player-expanded
Jul 29, 2026
Merged

imsyy merged 2 commits into
SPlayer-Dev:devfrom
MoYingJi:pr/fix/player-expanded

Conversation

@MoYingJi

Copy link
Copy Markdown
Collaborator

改动类型

  • 新功能(feat)
  • 缺陷修复(fix)
  • 重构 / 优化(不改变对外行为)
  • 文档(docs)
  • 其他(请在「改动说明」中注明)

是否包含破坏性变更

  • 是(请在「改动说明」中详细描述)
  • 否

改动说明

  1. 0ecf0e1 引入了一个 bug,将 statusStore 持久化策略改为黑名单(omit)后,播放器展开状态(isExpanded)等纯 UI 状态被意外写入 localStorage,导致刷新页面后播放器为展开状态,且此时的播放器右侧的歌词消失(我是 AMLL),与预期行为不符。第一个 commit 修复了此问题,并改回 pick
  2. isExpanded 命名过于泛化,原注释 菜单折叠状态 与实际用途(全屏播放器展开状态)完全不符,影响代码可读性和维护性。第二个 commit 将 isExpanded 重命名为 isPlayerExpanded 并修改注释(我在想是不是叫 fullPlayerOpen 好一点,但既然原来叫 isExpanded 肯定有它的深意)

测试情况

在 Arch Linux 上测试通过

自查清单

  • 本 PR 只包含一个主要功能 / 修复,没有夹带无关改动
  • 已在本地完整测试通过;AI 生成的代码同样自行测试并审阅过,未做未经验证的提交
  • 已运行 pnpm format,并确认 pnpm typecheck、pnpm lint 通过
  • 改动涉及原生模块时已 pnpm build:native 验证;未手写 native/*/index.d.ts
  • 已向 dev 分支提交

Copilot AI review requested due to automatic review settings July 28, 2026 17:11
@MoYingJi
MoYingJi force-pushed the pr/fix/player-expanded branch from b68480f to b131e54 Compare July 28, 2026 17:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

修复全屏播放器展开状态被意外持久化的问题,并统一状态命名。

Changes:

  • 恢复 pick 持久化白名单并加入列表排序字段。
  • 将 isExpanded 重命名为 isPlayerExpanded。
  • 同步更新全屏播放器相关引用。

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/stores/status.ts 修正持久化策略并重命名状态
src/layouts/MainLayout.vue 更新布局状态引用
src/core/hotkey/registry.ts 更新播放器快捷操作
src/composables/useImmersiveMode.ts 更新沉浸模式参数命名
src/components/player/TrackInfo.vue 更新播放器展开操作
src/components/player/FullPlayer/PlayerData.vue 更新页面跳转时的收起操作
src/components/player/FullPlayer/PlayerCover.vue 更新高清封面加载条件
src/components/player/FullPlayer/PlayerBackground.vue 更新背景生命周期条件
src/components/player/FullPlayer/index.vue 更新全屏播放器状态引用

Copilot AI review requested due to automatic review settings July 28, 2026 17:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

@imsyy
imsyy merged commit fda7d44 into SPlayer-Dev:dev Jul 29, 2026
1 check passed
@MoYingJi
MoYingJi deleted the pr/fix/player-expanded branch July 29, 2026 06:19
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.

3 participants