mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 18:52:30 +00:00
removed legacy temporary messages
This commit is contained in:
@@ -1062,7 +1062,6 @@ int32_t CannedMessageModule::runOnce()
|
|||||||
graphics::NotificationRenderer::virtualKeyboard = nullptr;
|
graphics::NotificationRenderer::virtualKeyboard = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
temporaryMessage = "";
|
|
||||||
return INT32_MAX;
|
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_ACK_NACK_RECEIVED) ||
|
||||||
(this->runState == CANNED_MESSAGE_RUN_STATE_MESSAGE_SELECTION)) {
|
(this->runState == CANNED_MESSAGE_RUN_STATE_MESSAGE_SELECTION)) {
|
||||||
this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;
|
this->runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;
|
||||||
temporaryMessage = "";
|
|
||||||
e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;
|
e.action = UIFrameEvent::Action::REGENERATE_FRAMESET;
|
||||||
this->currentMessageIndex = -1;
|
this->currentMessageIndex = -1;
|
||||||
this->freetext = "";
|
this->freetext = "";
|
||||||
@@ -1372,16 +1370,6 @@ int CannedMessageModule::getPrevIndex()
|
|||||||
return this->currentMessageIndex - 1;
|
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)
|
#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
|
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
|
// Emote Picker Screen
|
||||||
if (this->runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER) {
|
if (this->runState == CANNED_MESSAGE_RUN_STATE_EMOTE_PICKER) {
|
||||||
drawEmotePickerScreen(display, state, x, y); // <-- Call your emote picker drawer here
|
drawEmotePickerScreen(display, state, x, y); // <-- Call your emote picker drawer here
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ class CannedMessageModule : public SinglePortModule, public Observable<const UIF
|
|||||||
// === State/UI ===
|
// === State/UI ===
|
||||||
bool shouldDraw();
|
bool shouldDraw();
|
||||||
bool hasMessages();
|
bool hasMessages();
|
||||||
void showTemporaryMessage(const String &message);
|
|
||||||
void resetSearch();
|
void resetSearch();
|
||||||
void updateDestinationSelectionList();
|
void updateDestinationSelectionList();
|
||||||
void drawDestinationSelectionScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
void drawDestinationSelectionScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||||
@@ -153,7 +152,6 @@ class CannedMessageModule : public SinglePortModule, public Observable<const UIF
|
|||||||
unsigned long lastUpdateMillis = 0;
|
unsigned long lastUpdateMillis = 0;
|
||||||
String searchQuery;
|
String searchQuery;
|
||||||
String freetext;
|
String freetext;
|
||||||
String temporaryMessage;
|
|
||||||
|
|
||||||
// === Message Storage ===
|
// === Message Storage ===
|
||||||
char messageBuffer[CANNED_MESSAGE_MODULE_MESSAGES_SIZE + 1];
|
char messageBuffer[CANNED_MESSAGE_MODULE_MESSAGES_SIZE + 1];
|
||||||
|
|||||||
Reference in New Issue
Block a user