no focus on messages if screen carousel is disabled

This commit is contained in:
isseysandei 2025-01-18 21:19:12 +01:00
parent 950341d1f9
commit eacf3cd0db

View File

@ -2662,19 +2662,22 @@ int Screen::handleStatusUpdate(const meshtastic::Status *arg)
int Screen::handleTextMessage(const meshtastic_MeshPacket *packet) int Screen::handleTextMessage(const meshtastic_MeshPacket *packet)
{ {
if (showingNormalScreen) { if (config.display.auto_screen_carousel_secs != 0) {
// Outgoing message if (showingNormalScreen) {
if (packet->from == 0) // Outgoing message
setFrames(FOCUS_PRESERVE); // Return to same frame (quietly hiding the rx text message frame) if (packet->from == 0)
setFrames(FOCUS_PRESERVE); // Return to same frame (quietly hiding the rx text message frame)
// Incoming message // Incoming message
else else
setFrames(FOCUS_TEXTMESSAGE); // Focus on the new message setFrames(FOCUS_TEXTMESSAGE); // Focus on the new message
}
} }
return 0; return 0;
} }
// Triggered by MeshModules // Triggered by MeshModules
int Screen::handleUIFrameEvent(const UIFrameEvent *event) int Screen::handleUIFrameEvent(const UIFrameEvent *event)
{ {