mirror of
https://github.com/crosspoint-reader/crosspoint-reader.git
synced 2026-04-29 10:26:52 -07:00
Redesign home screen (#166)
## Summary * Redesigned home screen with big option to continue reading and slightly nicer options to navigate to core sections * Attempt to use the cached EPUB details (title, author) if they exist, otherwise fall back to file name * Adjusted button hints on home screen, removed Back option and changed left/right to up/down ## Additional Context * Core of this work comes from @ChandhokTannay in https://github.com/ChandhokTannay/crosspoint-reader/commit/1d36a86ef1f016e796ef993c14fb1f9ea2f0101d
This commit is contained in:
+6
-1
@@ -139,7 +139,7 @@ bool Epub::parseTocNcxFile() const {
|
||||
}
|
||||
|
||||
// load in the meta data for the epub file
|
||||
bool Epub::load() {
|
||||
bool Epub::load(const bool buildIfMissing) {
|
||||
Serial.printf("[%lu] [EBP] Loading ePub: %s\n", millis(), filepath.c_str());
|
||||
|
||||
// Initialize spine/TOC cache
|
||||
@@ -151,6 +151,11 @@ bool Epub::load() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If we didn't load from cache above and we aren't allowed to build, fail now
|
||||
if (!buildIfMissing) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Cache doesn't exist or is invalid, build it
|
||||
Serial.printf("[%lu] [EBP] Cache not found, building spine/TOC cache\n", millis());
|
||||
setupCacheDir();
|
||||
|
||||
Reference in New Issue
Block a user