@@ -958,65 +958,65 @@ static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state
958958
959959 display->setColor (WHITE);
960960#ifndef EXCLUDE_EMOJI
961- if (strcmp (reinterpret_cast <const char *>(mp.decoded .payload .bytes ), " \U0001F44D " ) == 0 ) {
961+ const char *msg = reinterpret_cast <const char *>(mp.decoded .payload .bytes );
962+ if (strcmp (msg, " \U0001F44D " ) == 0 ) {
962963 display->drawXbm (x + (SCREEN_WIDTH - thumbs_width) / 2 ,
963964 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5 , thumbs_width, thumbs_height,
964965 thumbup);
965- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " \U0001F44E " ) == 0 ) {
966+ } else if (strcmp (msg , " \U0001F44E " ) == 0 ) {
966967 display->drawXbm (x + (SCREEN_WIDTH - thumbs_width) / 2 ,
967968 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5 , thumbs_width, thumbs_height,
968969 thumbdown);
969- } else if (strcmp (reinterpret_cast <const char *>(mp.decoded .payload .bytes ), " \U0001F60A " ) == 0 ||
970- strcmp (reinterpret_cast <const char *>(mp.decoded .payload .bytes ), " \U0001F600 " ) == 0 ||
971- strcmp (reinterpret_cast <const char *>(mp.decoded .payload .bytes ), " \U0001F642 " ) == 0 ||
972- strcmp (reinterpret_cast <const char *>(mp.decoded .payload .bytes ), " \U0001F609 " ) == 0 ||
973- strcmp (reinterpret_cast <const char *>(mp.decoded .payload .bytes ), " \U0001F601 " ) ==
974- 0 ) { // matches 5 different common smileys, so that the phone user doesn't have to remember which one is
975- // compatible
970+ } else if (strcmp (msg, " \U0001F60A " ) == 0 || strcmp (msg, " \U0001F600 " ) == 0 || strcmp (msg, " \U0001F642 " ) == 0 ||
971+ strcmp (msg, " \U0001F609 " ) == 0 ||
972+ strcmp (msg, " \U0001F601 " ) == 0 ) { // matches 5 different common smileys, so that the phone user doesn't have to
973+ // remember which one is compatible
976974 display->drawXbm (x + (SCREEN_WIDTH - smiley_width) / 2 ,
977975 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - smiley_height) / 2 + 2 + 5 , smiley_width, smiley_height,
978976 smiley);
979- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " ❓" ) == 0 ) {
977+ } else if (strcmp (msg , " ❓" ) == 0 ) {
980978 display->drawXbm (x + (SCREEN_WIDTH - question_width) / 2 ,
981979 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - question_height) / 2 + 2 + 5 , question_width, question_height,
982980 question);
983- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " ‼️" ) == 0 ) {
981+ } else if (strcmp (msg , " ‼️" ) == 0 ) {
984982 display->drawXbm (x + (SCREEN_WIDTH - bang_width) / 2 , y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - bang_height) / 2 + 2 + 5 ,
985983 bang_width, bang_height, bang);
986- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " \U0001F4A9 " ) == 0 ) {
984+ } else if (strcmp (msg , " \U0001F4A9 " ) == 0 ) {
987985 display->drawXbm (x + (SCREEN_WIDTH - poo_width) / 2 , y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - poo_height) / 2 + 2 + 5 ,
988986 poo_width, poo_height, poo);
989- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " \xf0\x9f\xa4\xa3 " ) == 0 ) {
987+ } else if (strcmp (msg , " \U0001F923 " ) == 0 ) {
990988 display->drawXbm (x + (SCREEN_WIDTH - haha_width) / 2 , y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - haha_height) / 2 + 2 + 5 ,
991989 haha_width, haha_height, haha);
992- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " \U0001F44B " ) == 0 ) {
990+ } else if (strcmp (msg , " \U0001F44B " ) == 0 ) {
993991 display->drawXbm (x + (SCREEN_WIDTH - wave_icon_width) / 2 ,
994992 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - wave_icon_height) / 2 + 2 + 5 , wave_icon_width,
995993 wave_icon_height, wave_icon);
996- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " \U0001F920 " ) == 0 ) {
994+ } else if (strcmp (msg , " \U0001F920 " ) == 0 ) {
997995 display->drawXbm (x + (SCREEN_WIDTH - cowboy_width) / 2 ,
998996 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cowboy_height) / 2 + 2 + 5 , cowboy_width, cowboy_height,
999997 cowboy);
1000- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " \U0001F42D " ) == 0 ) {
998+ } else if (strcmp (msg , " \U0001F42D " ) == 0 ) {
1001999 display->drawXbm (x + (SCREEN_WIDTH - deadmau5_width) / 2 ,
10021000 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - deadmau5_height) / 2 + 2 + 5 , deadmau5_width, deadmau5_height,
10031001 deadmau5);
1004- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " \xE2\x98\x80\xEF\xB8\x8F " ) == 0 ) {
1002+ } else if (strcmp (msg , " \xE2\x98\x80\xEF\xB8\x8F " ) == 0 ) {
10051003 display->drawXbm (x + (SCREEN_WIDTH - sun_width) / 2 , y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - sun_height) / 2 + 2 + 5 ,
10061004 sun_width, sun_height, sun);
1007- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " \u2614 " ) == 0 ) {
1005+ } else if (strcmp (msg , " \u2614 " ) == 0 ) {
10081006 display->drawXbm (x + (SCREEN_WIDTH - rain_width) / 2 , y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - rain_height) / 2 + 2 + 10 ,
10091007 rain_width, rain_height, rain);
1010- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " ☁️" ) == 0 ) {
1008+ } else if (strcmp (msg , " ☁️" ) == 0 ) {
10111009 display->drawXbm (x + (SCREEN_WIDTH - cloud_width) / 2 ,
10121010 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cloud_height) / 2 + 2 + 5 , cloud_width, cloud_height, cloud);
1013- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " 🌫️" ) == 0 ) {
1011+ } else if (strcmp (msg , " 🌫️" ) == 0 ) {
10141012 display->drawXbm (x + (SCREEN_WIDTH - fog_width) / 2 , y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - fog_height) / 2 + 2 + 5 ,
10151013 fog_width, fog_height, fog);
1016- } else if (strcmp (reinterpret_cast < const char *>(mp. decoded . payload . bytes ) , " \xf0\x9f\x98\x88 " ) == 0 ) {
1014+ } else if (strcmp (msg , " \U0001F608 " ) == 0 ) {
10171015 display->drawXbm (x + (SCREEN_WIDTH - devil_width) / 2 ,
10181016 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - devil_height) / 2 + 2 + 5 , devil_width, devil_height, devil);
1019- } else if (strcmp (reinterpret_cast <const char *>(mp.decoded .payload .bytes ), " ♥️" ) == 0 ) {
1017+ } else if (strcmp (msg, " ♥️" ) == 0 || strcmp (msg, " \U0001F9E1 " ) == 0 || strcmp (msg, " \U00002763 " ) == 0 ||
1018+ strcmp (msg, " \U00002764 " ) == 0 || strcmp (msg, " \U0001F495 " ) == 0 || strcmp (msg, " \U0001F496 " ) == 0 ||
1019+ strcmp (msg, " \U0001F497 " ) == 0 || strcmp (msg, " \U0001F496 " ) == 0 ) {
10201020 display->drawXbm (x + (SCREEN_WIDTH - heart_width) / 2 ,
10211021 y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - heart_height) / 2 + 2 + 5 , heart_width, heart_height, heart);
10221022 } else {
0 commit comments