mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user