Skip to content

Commit 90c492b

Browse files
committed
use filled black badge if username is JBlanked
1 parent d2eb7b2 commit 90c492b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

run/run.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,11 +583,25 @@ void FlipSocialRun::drawExploreView(Canvas *canvas)
583583
void FlipSocialRun::drawFeedItem(Canvas *canvas, char *username, char *message, char *flipped, char *flips, char *date_created, char *comments, bool isComment)
584584
{
585585
bool isFlipped = strcmp(flipped, "true") == 0;
586+
bool isAdmin = strcmp(username, "JBlanked") == 0;
586587
auto flipCount = atoi(flips);
587588
// auto commentCount = atoi(comments);
588589
canvas_clear(canvas);
589590
canvas_set_font_custom(canvas, FONT_SIZE_LARGE);
590-
canvas_draw_str(canvas, 0, 7, username);
591+
592+
if (isAdmin)
593+
{
594+
// Filled black badge with white username text
595+
int user_width = canvas_string_width(canvas, username);
596+
canvas_draw_rbox(canvas, 0, 0, user_width + 4, 10, 2);
597+
canvas_set_color(canvas, ColorWhite);
598+
canvas_draw_str(canvas, 1, 8, username);
599+
canvas_set_color(canvas, ColorBlack);
600+
}
601+
else
602+
{
603+
canvas_draw_str(canvas, 0, 7, username);
604+
}
591605

592606
if (!isComment)
593607
{

0 commit comments

Comments
 (0)