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.

Reduce number of full screen refreshes to once every 20 pages

+5 -8
+4 -7
lib/Epub/Epub/EpubHtmlParserSlim.cpp
··· 2 2 3 3 #include <EpdRenderer.h> 4 4 #include <HardwareSerial.h> 5 + #include <expat.h> 5 6 6 7 #include "Page.h" 7 8 #include "htmlEntities.h" ··· 51 52 } 52 53 currentTextBlock = new TextBlock(style); 53 54 } 54 - 55 - #include <expat.h> 56 55 57 56 void XMLCALL EpubHtmlParserSlim::startElement(void* userData, const XML_Char* name, const XML_Char** atts) { 58 57 auto* self = static_cast<EpubHtmlParserSlim*>(userData); ··· 154 153 // We don't want to flush out content when closing inline tags like <span>. 155 154 // Currently this also flushes out on closing <b> and <i> tags, but they are line tags so that shouldn't happen, 156 155 // text styling needs to be overhauled to fix it. 157 - const bool shouldBreakText = matches(name, BLOCK_TAGS, NUM_BLOCK_TAGS) || 158 - matches(name, HEADER_TAGS, NUM_HEADER_TAGS) || 159 - matches(name, BOLD_TAGS, NUM_BOLD_TAGS) || 160 - matches(name, ITALIC_TAGS, NUM_ITALIC_TAGS) || 161 - self->depth == 1; 156 + const bool shouldBreakText = 157 + matches(name, BLOCK_TAGS, NUM_BLOCK_TAGS) || matches(name, HEADER_TAGS, NUM_HEADER_TAGS) || 158 + matches(name, BOLD_TAGS, NUM_BOLD_TAGS) || matches(name, ITALIC_TAGS, NUM_ITALIC_TAGS) || self->depth == 1; 162 159 163 160 if (shouldBreakText) { 164 161 self->partWordBuffer[self->partWordBufferIndex] = '\0';
+1 -1
src/screens/EpubReaderScreen.cpp
··· 5 5 6 6 #include "Battery.h" 7 7 8 - constexpr int PAGES_PER_REFRESH = 10; 8 + constexpr int PAGES_PER_REFRESH = 20; 9 9 constexpr unsigned long SKIP_CHAPTER_MS = 700; 10 10 11 11 void EpubReaderScreen::taskTrampoline(void* param) {