Skip to content

Commit 2224fcd

Browse files
committed
Small changes after review.
1 parent 0aa0a98 commit 2224fcd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/displayapp/screens/Notifications.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -310,19 +310,19 @@ Notifications::NotificationItem::NotificationItem(const char* title,
310310
std::chrono::minutes age = std::chrono::duration_cast<std::chrono::minutes>(diff);
311311
uint32_t ageInt = static_cast<uint32_t>(age.count());
312312
char timeUnit;
313-
if ((ageInt / (60 * 24)) >= 1) {
313+
if (ageInt / (60 * 24) >= 1) {
314314
ageInt /= (60 * 24);
315315
timeUnit = 'd';
316-
} else if ((ageInt / 60) >= 1) {
316+
} else if (ageInt >= 60) {
317317
ageInt /= 60;
318318
timeUnit = 'h';
319319
} else {
320320
timeUnit = 'm';
321321
}
322-
lv_obj_t* alert_age = lv_label_create(container, nullptr);
323-
lv_label_set_text_fmt(alert_age, "%d%c ago", ageInt, timeUnit);
322+
lv_obj_t* alertAge = lv_label_create(container, nullptr);
323+
lv_label_set_text_fmt(alertAge, "%d%c ago", ageInt, timeUnit);
324324
// same format as alert_count
325-
lv_obj_align(alert_age, container, LV_ALIGN_IN_BOTTOM_RIGHT, 0, -16);
325+
lv_obj_align(alertAge, container, LV_ALIGN_IN_BOTTOM_RIGHT, -10, -10);
326326
}
327327

328328
// copy title to label and replace newlines with spaces

0 commit comments

Comments
 (0)