mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-19 08:17:26 +00:00
Update message caching to correct aged timestamp
This commit is contained in:
parent
a6cc4ab3fe
commit
e6ba326876
@ -279,6 +279,14 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
cachedLines = generateLines(display, headerStr, messageBuf, textWidth);
|
cachedLines = generateLines(display, headerStr, messageBuf, textWidth);
|
||||||
cachedHeights = calculateLineHeights(cachedLines, emotes);
|
cachedHeights = calculateLineHeights(cachedLines, emotes);
|
||||||
cachedKey = currentKey;
|
cachedKey = currentKey;
|
||||||
|
} else {
|
||||||
|
// Cache hit but update the header line with current time information
|
||||||
|
cachedLines[0] = std::string(headerStr);
|
||||||
|
// The header always has a fixed height since it doesn't contain emotes
|
||||||
|
// As per calculateLineHeights logic for lines without emotes:
|
||||||
|
cachedHeights[0] = FONT_HEIGHT_SMALL - 2;
|
||||||
|
if (cachedHeights[0] < 8)
|
||||||
|
cachedHeights[0] = 8; // minimum safety
|
||||||
}
|
}
|
||||||
|
|
||||||
// === Scrolling logic ===
|
// === Scrolling logic ===
|
||||||
|
Loading…
Reference in New Issue
Block a user