Additional checks for closing Scan&Select canned frame

This commit is contained in:
Robert Fisk 2024-08-14 04:16:05 -04:00 committed by Thomas Göttgens
parent 27f00cd156
commit d983ca5e6c

View File

@ -2315,7 +2315,9 @@ void Screen::handleOnPress()
{ {
// If Canned Messages is using the "Scan and Select" input, dismiss the canned message frame when user button is pressed // If Canned Messages is using the "Scan and Select" input, dismiss the canned message frame when user button is pressed
// Minimize impact as a courtesy, as "scan and select" may be used as default config for some boards // Minimize impact as a courtesy, as "scan and select" may be used as default config for some boards
if (scanAndSelectInput != nullptr && scanAndSelectInput->dismissCannedMessageFrame()) // (Fall-through if using auto carousel, to prevent unexpected closing of canned message frame)
if (scanAndSelectInput != nullptr && !config.display.auto_screen_carousel_secs &&
scanAndSelectInput->dismissCannedMessageFrame())
return; return;
// Don't transition away from canned messages if it is active // Don't transition away from canned messages if it is active