Skip to content

Commit 8df7cc4

Browse files
authored
Lyric tab button toggle
1 parent c7aa556 commit 8df7cc4

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

Utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ const Utils = {
670670
/**
671671
* Current version of the lyrics-plus app
672672
*/
673-
currentVersion: "2.0.4",
673+
currentVersion: "2.0.5",
674674

675675
/**
676676
* Check for updates from remote repository

index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,9 +2975,17 @@ class LyricsContainer extends react.Component {
29752975
}
29762976

29772977
lockIn(mode) {
2978-
CONFIG.locked = mode;
2979-
localStorage.setItem("lyrics-plus:lock-mode", mode.toString());
2980-
this.setState({ lockMode: mode });
2978+
// 토글: 이미 같은 모드로 고정되어 있으면 해제
2979+
if (this.state.lockMode === mode) {
2980+
CONFIG.locked = -1;
2981+
localStorage.removeItem("lyrics-plus:lock-mode");
2982+
this.setState({ lockMode: -1 });
2983+
} else {
2984+
// 새로운 모드로 고정
2985+
CONFIG.locked = mode;
2986+
localStorage.setItem("lyrics-plus:lock-mode", mode.toString());
2987+
this.setState({ lockMode: mode });
2988+
}
29812989
this.fetchLyrics();
29822990
}
29832991
}

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.4
1+
2.0.5

0 commit comments

Comments
 (0)