Don't run message persistent in MUI

This commit is contained in:
Jason P
2025-11-06 08:30:12 -06:00
parent aace45305d
commit 65a5cec1c1

View File

@@ -22,6 +22,8 @@ ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp
devicestate.rx_text_message = mp; devicestate.rx_text_message = mp;
devicestate.has_rx_text_message = true; devicestate.has_rx_text_message = true;
#if HAS_SCREEN #if HAS_SCREEN
// Guard against running in MeshtasticUI
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
// Store in the central message history // Store in the central message history
const StoredMessage &sm = messageStore.addFromPacket(mp); const StoredMessage &sm = messageStore.addFromPacket(mp);
@@ -29,6 +31,7 @@ ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp
// Use the global Screen singleton to retrieve the current OLED display // Use the global Screen singleton to retrieve the current OLED display
auto *display = screen ? screen->getDisplayDevice() : nullptr; auto *display = screen ? screen->getDisplayDevice() : nullptr;
graphics::MessageRenderer::handleNewMessage(display, sm, mp); graphics::MessageRenderer::handleNewMessage(display, sm, mp);
}
#endif #endif
// Only trigger screen wake if configuration allows it // Only trigger screen wake if configuration allows it
if (shouldWakeOnReceivedMessage()) { if (shouldWakeOnReceivedMessage()) {