diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index e3e4638a6..5d70d868a 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -1062,7 +1062,6 @@ int32_t CannedMessageModule::runOnce() graphics::NotificationRenderer::virtualKeyboard = nullptr; } - temporaryMessage = ""; return INT32_MAX; } @@ -1106,7 +1105,6 @@ int32_t CannedMessageModule::runOnce() (this->runState == CANNED_MESSAGE_RUN_STATE_ACK_NACK_RECEIVED) || (this->runState == CANNED_MESSAGE_RUN_STATE_MESSAGE_SELECTION)) { this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE; - temporaryMessage = ""; e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; this->currentMessageIndex = -1; this->freetext = ""; @@ -1372,16 +1370,6 @@ int CannedMessageModule::getPrevIndex() return this->currentMessageIndex - 1; } } -void CannedMessageModule::showTemporaryMessage(const String &message) -{ - temporaryMessage = message; - UIFrameEvent e; - e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen - notifyObservers(&e); - runState = CANNED_MESSAGE_RUN_STATE_MESSAGE_SELECTION; - // run this loop again in 2 seconds, next iteration will clear the display - setIntervalFromNow(2000); -} #if defined(USE_VIRTUAL_KEYBOARD) @@ -1802,16 +1790,6 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st return; // bail if not in a UI state that should render } - // Draw temporary message if available - if (temporaryMessage.length() != 0) { - requestFocus(); // Tell Screen::setFrames to move to our module's frame - LOG_DEBUG("Draw temporary message: %s", temporaryMessage.c_str()); - display->setTextAlignment(TEXT_ALIGN_CENTER); - display->setFont(FONT_MEDIUM); - display->drawString(display->getWidth() / 2 + x, 0 + y + 12, temporaryMessage); - return; - } - // Emote Picker Screen if (this->runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER) { drawEmotePickerScreen(display, state, x, y); // <-- Call your emote picker drawer here diff --git a/src/modules/CannedMessageModule.h b/src/modules/CannedMessageModule.h index f32047f51..3d7c09d87 100644 --- a/src/modules/CannedMessageModule.h +++ b/src/modules/CannedMessageModule.h @@ -75,7 +75,6 @@ class CannedMessageModule : public SinglePortModule, public Observable