Add TXT file reader support
- Add Txt library for loading and parsing plain text files - Create TxtReaderActivity with streaming page rendering - Uses 8KB chunks to handle large files without memory issues - Page index caching for fast re-open after sleep - Progress bar during initial indexing - Word wrapping with UTF-8 support - Support cover images for TXT files - Priority: same filename as TXT (e.g., book.jpg for book.txt) - Fallback: cover.bmp/jpg/jpeg in same folder - Converts JPG to BMP using existing converter - Update SleepActivity to show TXT cover images in Cover mode - Add .txt extension to file browser filter
This commit is contained in:
@@ -53,7 +53,7 @@ void FileSelectionActivity::loadFiles() {
|
||||
auto filename = std::string(name);
|
||||
std::string ext4 = filename.length() >= 4 ? filename.substr(filename.length() - 4) : "";
|
||||
std::string ext5 = filename.length() >= 5 ? filename.substr(filename.length() - 5) : "";
|
||||
if (ext5 == ".epub" || ext5 == ".xtch" || ext4 == ".xtc") {
|
||||
if (ext5 == ".epub" || ext5 == ".xtch" || ext4 == ".xtc" || ext4 == ".txt") {
|
||||
files.emplace_back(filename);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user