Cycles window.sortMode: (MusicSortMode::original or other) → order1 → order2 → MusicSortMode::original
| 91 | |
| 92 | // Cycles window.sortMode: (MusicSortMode::original or other) → order1 → order2 → MusicSortMode::original |
| 93 | static void cycleSortMode(Ui::Window& window, Jukebox::MusicSortMode order1, Jukebox::MusicSortMode order2) |
| 94 | { |
| 95 | auto oldSortMode = Jukebox::MusicSortMode(window.sortMode); |
| 96 | auto newSortMode = order1; |
| 97 | |
| 98 | if (oldSortMode == order2) |
| 99 | { |
| 100 | newSortMode = Jukebox::MusicSortMode::original; |
| 101 | } |
| 102 | else if (oldSortMode == order1) |
| 103 | { |
| 104 | newSortMode = order2; |
| 105 | } |
| 106 | setSortMode(window, newSortMode); |
| 107 | |
| 108 | window.invalidate(); |
| 109 | } |
| 110 | |
| 111 | static void updateStatusBar(Ui::Window& self, uint16_t numTracksSelected) |
| 112 | { |
no test coverage detected