Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

Commit d843add

Browse files
🦄 refactor: 优化检查登录状态的可读性
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent a7022df commit d843add

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/core/player/PlayModeManager.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,11 @@ export class PlayModeManager {
112112
const idx = shuffled.findIndex((s) => s.id === musicStore.playSong?.id);
113113
if (idx !== -1) statusStore.playIndex = idx;
114114
} else if (nextMode === "heartbeat") {
115-
if (isLogin() !== 1) {
115+
const loginStatus = isLogin();
116+
if (loginStatus !== 1) {
116117
// 未登录,回滚状态
117118
statusStore.shuffleMode = previousMode;
118-
if (isLogin() === 0) {
119+
if (loginStatus === 0) {
119120
openUserLogin(true);
120121
} else {
121122
window.$message.warning("该登录模式暂不支持该操作");

0 commit comments

Comments
 (0)