Skip to content

Commit 5f4af3d

Browse files
authored
notifications: only show notification count if there's notifications
1 parent c0638c6 commit 5f4af3d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/displayapp/screens/Notifications.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,11 @@ Notifications::NotificationItem::NotificationItem(const char* title,
282282
lv_cont_set_fit(subject_container, LV_FIT_NONE);
283283

284284
lv_obj_t* alert_count = lv_label_create(container, nullptr);
285-
lv_label_set_text_fmt(alert_count, "%i/%i", notifNr, notifNb);
285+
if (notifNr == 0) {
286+
lv_label_set_text_fmt(alert_count, "", notifNr, notifNb);
287+
} else {
288+
lv_label_set_text_fmt(alert_count, "%i/%i", notifNr, notifNb);
289+
}
286290
lv_obj_align(alert_count, nullptr, LV_ALIGN_IN_TOP_RIGHT, 0, 16);
287291

288292
lv_obj_t* alert_type = lv_label_create(container, nullptr);

0 commit comments

Comments
 (0)