From d779821f0eb84c86fbb46dd8f5a0876c3155fc05 Mon Sep 17 00:00:00 2001 From: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com> Date: Sun, 21 Sep 2025 18:28:37 -0400 Subject: [PATCH] Nrf built issue fix --- src/MessageStore.cpp | 4 ++-- src/graphics/Screen.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/MessageStore.cpp b/src/MessageStore.cpp index 3c0eb2691..1cb5ca855 100644 --- a/src/MessageStore.cpp +++ b/src/MessageStore.cpp @@ -91,7 +91,7 @@ void MessageStore::saveToFlash() f.write((uint8_t *)&m.sender, sizeof(m.sender)); f.write((uint8_t *)&m.channelIndex, sizeof(m.channelIndex)); f.write((uint8_t *)&m.dest, sizeof(m.dest)); - f.write((uint8_t *)m.text.c_str(), std::min(MAX_MESSAGE_SIZE, (uint32_t)m.text.size())); + f.write((uint8_t *)m.text.c_str(), std::min(static_cast(MAX_MESSAGE_SIZE), m.text.size())); f.write('\0'); // null terminator } spiLock->unlock(); @@ -211,4 +211,4 @@ std::deque MessageStore::getDirectMessages() const } // === Global definition === -MessageStore messageStore("default"); \ No newline at end of file +MessageStore messageStore("default"); diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 35ab4b34f..c300cd227 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1374,6 +1374,9 @@ void Screen::handleShowPrevFrame() ui->previousFrame(); lastScreenTransition = millis(); setFastFramerate(); + + // Reset scroll state if we’re leaving the text message frame + graphics::MessageRenderer::resetScrollState(); } } @@ -1385,6 +1388,9 @@ void Screen::handleShowNextFrame() ui->nextFrame(); lastScreenTransition = millis(); setFastFramerate(); + + // Reset scroll state if we’re leaving the text message frame + graphics::MessageRenderer::resetScrollState(); } }