Add exclude emoji macro

This commit is contained in:
Ben Meadors
2024-05-22 20:40:26 -05:00
parent 1631462db1
commit 7d873eb06b
2 changed files with 7 additions and 0 deletions

View File

@@ -542,6 +542,7 @@ static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state
}
display->setColor(WHITE);
#ifndef EXCLUDE_EMOJI
if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\U0001F44D") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height,
@@ -597,6 +598,10 @@ static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state
snprintf(tempBuf, sizeof(tempBuf), "%s", mp.decoded.payload.bytes);
display->drawStringMaxWidth(0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), tempBuf);
}
#else
snprintf(tempBuf, sizeof(tempBuf), "%s", mp.decoded.payload.bytes);
display->drawStringMaxWidth(0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), tempBuf);
#endif
}
/// Draw the last waypoint we received