mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-03 20:30:43 +00:00
Warn
This commit is contained in:
parent
8a0b0f4be0
commit
f0c2da337e
@ -599,10 +599,14 @@ bool CannedMessageModule::handleMessageSelectorInput(const InputEvent *event, bo
|
|||||||
NodeNum destNode = dest;
|
NodeNum destNode = dest;
|
||||||
ChannelIndex chan = channel;
|
ChannelIndex chan = channel;
|
||||||
#if CANNED_MESSAGE_ADD_CONFIRMATION
|
#if CANNED_MESSAGE_ADD_CONFIRMATION
|
||||||
graphics::menuHandler::showConfirmationBanner(
|
graphics::menuHandler::showConfirmationBanner("Send message?", [this, destNode, chan, current]() {
|
||||||
"Send message?", [this, destNode, chan, current]() { this->sendText(destNode, chan, current, false); });
|
// this->sendText(destNode, chan, current, false);
|
||||||
|
payload = runState;
|
||||||
|
runState = CANNED_MESSAGE_RUN_STATE_ACTION_SELECT;
|
||||||
|
});
|
||||||
#else
|
#else
|
||||||
this->sendText(destNode, chan, current, false);
|
payload = runState;
|
||||||
|
runState = CANNED_MESSAGE_RUN_STATE_ACTION_SELECT;
|
||||||
#endif
|
#endif
|
||||||
// Do not immediately set runState; wait for confirmation
|
// Do not immediately set runState; wait for confirmation
|
||||||
handled = true;
|
handled = true;
|
||||||
@ -1719,7 +1723,7 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st
|
|||||||
// Text: split by words and wrap inside word if needed
|
// Text: split by words and wrap inside word if needed
|
||||||
String text = token.second;
|
String text = token.second;
|
||||||
pos = 0;
|
pos = 0;
|
||||||
while (pos < text.length()) {
|
while (pos < static_cast<int>(text.length())) {
|
||||||
// Find next space (or end)
|
// Find next space (or end)
|
||||||
int spacePos = text.indexOf(' ', pos);
|
int spacePos = text.indexOf(' ', pos);
|
||||||
int endPos = (spacePos == -1) ? text.length() : spacePos + 1; // Include space
|
int endPos = (spacePos == -1) ? text.length() : spacePos + 1; // Include space
|
||||||
|
Loading…
Reference in New Issue
Block a user