Skip to content

Commit bba4990

Browse files
committed
Style changes for review
1 parent 6e1c50e commit bba4990

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugins/shortcuts/mpris.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ function registerMPRIS(win) {
5252
player.on("loopStatus", (status) => {
5353
// switchRepeat cycles between states in that order
5454
const switches = ["None", "Playlist", "Track"];
55-
const curIdx = switches.indexOf(currentLoopStatus);
56-
const newIdx = switches.indexOf(status);
55+
const currentIndex = switches.indexOf(currentLoopStatus);
56+
const targetIndex = switches.indexOf(status);
5757

5858
// Get a delta in the range [0,2]
59-
const delta = ((newIdx - curIdx) % 3 + 3) % 3;
59+
const delta = (targetIndex - currentIndex + 3) % 3;
6060

6161
manuallySwitchingStatus = true;
6262
songControls.switchRepeat(delta);

providers/song-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = (win) => {
2121
go1sForward: () => pressKey(win, "l", ["shift"]),
2222
shuffle: () => pressKey(win, "s"),
2323
switchRepeat: (n = 1) => {
24-
for (let i = 0; i != n; ++i)
24+
for (let i = 0; i < n; i++)
2525
pressKey(win, "r");
2626
},
2727
// General

0 commit comments

Comments
 (0)