Continue unifying display, also show message status on the "isMine" lines

This commit is contained in:
Jason P 2025-10-05 15:01:22 -05:00
parent bebb1e9e8d
commit 8860f6195f
2 changed files with 13 additions and 4 deletions

View File

@ -466,7 +466,16 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
// Final header line
char headerStr[96];
if (mine) {
snprintf(headerStr, sizeof(headerStr), "me %s %s", timeBuf, chanType);
if (m.ackStatus == AckStatus::ACKED) {
// Destination ACK
snprintf(headerStr, sizeof(headerStr), "Sent %s %s", timeBuf, chanType);
} else if (m.ackStatus == AckStatus::NACKED || m.ackStatus == AckStatus::TIMEOUT) {
// Failure or timeout
snprintf(headerStr, sizeof(headerStr), "Failed %s %s", timeBuf, chanType);
} else if (m.ackStatus == AckStatus::RELAYED) {
// Relay ACK
snprintf(headerStr, sizeof(headerStr), "Relayed %s %s", timeBuf, chanType);
}
} else {
snprintf(headerStr, sizeof(headerStr), "%s @%s %s", timeBuf, sender, chanType);
}

View File

@ -202,13 +202,13 @@ void CannedMessageModule::drawHeader(OLEDDisplay *display, int16_t x, int16_t y,
if (this->dest == NODENUM_BROADCAST) {
display->drawStringf(x, y, buffer, "To: #%s", channels.getName(this->channel));
} else {
display->drawStringf(x, y, buffer, "To: %s", getNodeName(this->dest));
display->drawStringf(x, y, buffer, "To: @%s", getNodeName(this->dest));
}
} else {
if (this->dest == NODENUM_BROADCAST) {
display->drawStringf(x, y, buffer, "To: #%.20s", channels.getName(this->channel));
} else {
display->drawStringf(x, y, buffer, "To: %s", getNodeName(this->dest));
display->drawStringf(x, y, buffer, "To: @%s", getNodeName(this->dest));
}
}
}
@ -649,7 +649,7 @@ bool CannedMessageModule::handleMessageSelectorInput(const InputEvent *event, bo
if (this->dest == NODENUM_BROADCAST) {
snprintf(headerBuffer, sizeof(headerBuffer), "To: #%s", channels.getName(this->channel));
} else {
snprintf(headerBuffer, sizeof(headerBuffer), "To: %s", getNodeName(this->dest));
snprintf(headerBuffer, sizeof(headerBuffer), "To: @%s", getNodeName(this->dest));
}
screen->showTextInput(headerBuffer, "", 300000, [this](const std::string &text) {
if (!text.empty()) {