mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 22:22:05 +00:00
Fix more canned message timeout issues:
- Reliably timout when showing canned message list - Don't inconsistently clear freetext when scrolling canned message list
This commit is contained in:
parent
8e7991606e
commit
21d246ab7c
@ -419,9 +419,10 @@ int32_t CannedMessageModule::runOnce()
|
|||||||
|
|
||||||
this->notifyObservers(&e);
|
this->notifyObservers(&e);
|
||||||
} else if (((this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) || (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT)) &&
|
} else if (((this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) || (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT)) &&
|
||||||
((millis() - this->lastTouchMillis) > INACTIVATE_AFTER_MS)) {
|
((millis() - this->lastTouchMillis) >= INACTIVATE_AFTER_MS)) {
|
||||||
// Don't reset module, just hide the frame
|
// Don't reset module, just hide the frame
|
||||||
e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen
|
e.action = UIFrameEvent::Action::REGENERATE_FRAMESET; // We want to change the list of frames shown on-screen
|
||||||
|
this->currentMessageIndex = -1;
|
||||||
|
|
||||||
#if !defined(T_WATCH_S3) && !defined(RAK14014)
|
#if !defined(T_WATCH_S3) && !defined(RAK14014)
|
||||||
this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE;
|
this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE;
|
||||||
@ -474,8 +475,6 @@ int32_t CannedMessageModule::runOnce()
|
|||||||
} else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_UP) {
|
} else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_UP) {
|
||||||
if (this->messagesCount > 0) {
|
if (this->messagesCount > 0) {
|
||||||
this->currentMessageIndex = getPrevIndex();
|
this->currentMessageIndex = getPrevIndex();
|
||||||
this->freetext = ""; // clear freetext
|
|
||||||
this->cursor = 0;
|
|
||||||
|
|
||||||
#if !defined(T_WATCH_S3) && !defined(RAK14014)
|
#if !defined(T_WATCH_S3) && !defined(RAK14014)
|
||||||
this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE;
|
this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE;
|
||||||
@ -487,8 +486,6 @@ int32_t CannedMessageModule::runOnce()
|
|||||||
} else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_DOWN) {
|
} else if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTION_DOWN) {
|
||||||
if (this->messagesCount > 0) {
|
if (this->messagesCount > 0) {
|
||||||
this->currentMessageIndex = this->getNextIndex();
|
this->currentMessageIndex = this->getNextIndex();
|
||||||
this->freetext = ""; // clear freetext
|
|
||||||
this->cursor = 0;
|
|
||||||
|
|
||||||
#if !defined(T_WATCH_S3) && !defined(RAK14014)
|
#if !defined(T_WATCH_S3) && !defined(RAK14014)
|
||||||
this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE;
|
this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE;
|
||||||
@ -638,13 +635,9 @@ int32_t CannedMessageModule::runOnce()
|
|||||||
if (screen)
|
if (screen)
|
||||||
screen->removeFunctionSymbal("Fn");
|
screen->removeFunctionSymbal("Fn");
|
||||||
}
|
}
|
||||||
|
|
||||||
this->lastTouchMillis = millis();
|
|
||||||
this->notifyObservers(&e);
|
|
||||||
return INACTIVATE_AFTER_MS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) {
|
if (this->runState == CANNED_MESSAGE_RUN_STATE_FREETEXT || this->runState == CANNED_MESSAGE_RUN_STATE_ACTIVE) {
|
||||||
this->lastTouchMillis = millis();
|
this->lastTouchMillis = millis();
|
||||||
this->notifyObservers(&e);
|
this->notifyObservers(&e);
|
||||||
return INACTIVATE_AFTER_MS;
|
return INACTIVATE_AFTER_MS;
|
||||||
|
Loading…
Reference in New Issue
Block a user