From a2bf03ce944b83bef425df315e0055049990bd1f Mon Sep 17 00:00:00 2001 From: Florrie Date: Sat, 2 Sep 2017 11:10:14 -0300 Subject: Remove prototype picker --- src/pickers2.js | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'src/pickers2.js') diff --git a/src/pickers2.js b/src/pickers2.js index 09b066d..1921e88 100644 --- a/src/pickers2.js +++ b/src/pickers2.js @@ -67,37 +67,6 @@ class HistoryManager { } } -/* -const createOrderedPicker = playlist => { - const flattened = flattenGrouplike(playlist) - - return lastTrack => { - if (lastTrack === null) { - return flattened.items[0] - } - - const index = flattened.items.indexOf(lastTrack) - - // Technically, if the index is -1, flattened[0] will be automatically - // selected, but that isn't really obvious; handling it separately makes - // it clearer that when we're given a track that's not in the playlist, - // we just pick the first track in the entire playlist. - if (index === -1) { - return flattened.items[0] - } - - // If we just played the last track, start back from the beginning. - if (index + 1 === flattened.items.length) { - return flattened.items[0] - } - - // Otherwise, we just played some other track in the playlist, so we just - // pick the next track. - return flattened.items[index + 1] - } -} -*/ - function shuffleGroups(grouplike) { if (isGroup(grouplike) && grouplike.items.every(isGroup)) { const items = shuffleArray(grouplike.items.map(shuffleGroups)) -- cgit 1.3.0-6-gf8a5