style(ui): drop dead if(found) guard in favourites badge

The favourites render already continues on !found (gone-slot prune), so the
badge block only runs when found is true. The if(found) guard around the
unread-badge lookup was always true — remove it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-07-05 22:51:56 +02:00
parent 638eea7bb0
commit fbcc67f275

View File

@@ -1239,12 +1239,10 @@ public:
// before it instead of underneath. Badge and name share one baseline.
char badge[5] = "";
int bw = 0;
if (found) {
uint8_t unread = _task->getDMUnread(ci.id.pub_key);
if (unread > 0) {
snprintf(badge, sizeof(badge), "%d", unread);
bw = display.getTextWidth(badge) + 3; // badge + 3 px gap
}
uint8_t unread = _task->getDMUnread(ci.id.pub_key);
if (unread > 0) {
snprintf(badge, sizeof(badge), "%d", unread);
bw = display.getTextWidth(badge) + 3; // badge + 3 px gap
}
int name_y = cy + (cell_h - line_h) / 2;
int name_max_w = cell_w - 4 - bw;