This commit is contained in:
Ben Meadors 2025-07-31 06:05:33 -05:00
parent 8a0b0f4be0
commit f0c2da337e

View File

@ -599,10 +599,14 @@ bool CannedMessageModule::handleMessageSelectorInput(const InputEvent *event, bo
NodeNum destNode = dest;
ChannelIndex chan = channel;
#if CANNED_MESSAGE_ADD_CONFIRMATION
graphics::menuHandler::showConfirmationBanner(
"Send message?", [this, destNode, chan, current]() { this->sendText(destNode, chan, current, false); });
graphics::menuHandler::showConfirmationBanner("Send message?", [this, destNode, chan, current]() {
// this->sendText(destNode, chan, current, false);
payload = runState;
runState = CANNED_MESSAGE_RUN_STATE_ACTION_SELECT;
});
#else
this->sendText(destNode, chan, current, false);
payload = runState;
runState = CANNED_MESSAGE_RUN_STATE_ACTION_SELECT;
#endif
// Do not immediately set runState; wait for confirmation
handled = true;
@ -1719,7 +1723,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
// Text: split by words and wrap inside word if needed
String text = token.second;
pos = 0;
while (pos < text.length()) {
while (pos < static_cast<int>(text.length())) {
// Find next space (or end)
int spacePos = text.indexOf(' ', pos);
int endPos = (spacePos == -1) ? text.length() : spacePos + 1; // Include space