Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No focus on new messages if auto-carousel is off #5881

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/graphics/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2661,15 +2661,18 @@ int Screen::handleStatusUpdate(const meshtastic::Status *arg)
}

int Screen::handleTextMessage(const meshtastic_MeshPacket *packet)
// If auto carousel is disabled, the focus doesn't chage on the incoming message
{
if (showingNormalScreen) {
// Outgoing message
if (packet->from == 0)
setFrames(FOCUS_PRESERVE); // Return to same frame (quietly hiding the rx text message frame)
if (config.display.auto_screen_carousel_secs != 0) {
if (showingNormalScreen) {
// Outgoing message
if (packet->from == 0)
thebentern marked this conversation as resolved.
Show resolved Hide resolved
setFrames(FOCUS_PRESERVE); // Return to same frame (quietly hiding the rx text message frame)

// Incoming message
else
setFrames(FOCUS_TEXTMESSAGE); // Focus on the new message
// Incoming message
else
setFrames(FOCUS_TEXTMESSAGE); // Focus on the new message
}
}

return 0;
Expand Down Expand Up @@ -2756,4 +2759,4 @@ int Screen::handleAdminMessage(const meshtastic_AdminMessage *arg)
} // namespace graphics
#else
graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {}
#endif // HAS_SCREEN
#endif // HAS_SCREEN
Loading