A fork of https://github.com/crosspoint-reader/crosspoint-reader
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Sort items on FileSelectionScreen

+9
+9
src/screens/FileSelectionScreen.cpp
··· 3 3 #include <EpdRenderer.h> 4 4 #include <SD.h> 5 5 6 + void caseInsensitiveSort(std::vector<std::string>& strs) { 7 + std::sort(begin(strs), end(strs), [](const std::string& str1, const std::string& str2) { 8 + return lexicographical_compare( 9 + begin(str1), end(str1), begin(str2), end(str2), 10 + [](const char& char1, const char& char2) { return tolower(char1) < tolower(char2); }); 11 + }); 12 + } 13 + 6 14 void FileSelectionScreen::taskTrampoline(void* param) { 7 15 auto* self = static_cast<FileSelectionScreen*>(param); 8 16 self->displayTaskLoop(); ··· 27 35 file.close(); 28 36 } 29 37 root.close(); 38 + caseInsensitiveSort(files); 30 39 } 31 40 32 41 void FileSelectionScreen::onEnter() {