Latest Notification Is Determined Using String Comparison

Changes:

- Added #include "StringHelper.h" to MenuHelper.h for utility functions.

- Updated displayNewNotification() to compare notification IDs using util::extractNumber() instead of raw string comparison.

- Ensured numeric ordering of notifications by extracting and comparing integer values from IDs.

- Preserved existing notification selection logic while improving accuracy of ID comparisons.

Fixes #2081
This commit is contained in:
Avinash Rajesh
2026-06-17 15:17:55 +05:30
parent 1179f92849
commit 9d166362a7
@@ -28,6 +28,7 @@ Date: 21-May-2026
#include "Utility.h"
#include "Validator.h"
#include "Vector.h"
#include "StringHelper.h"
/*
Function: displayAllServices
@@ -1430,7 +1431,7 @@ inline void displayNewNotification(util::Vector<const Notification*> notificatio
}
else
{
if (notification->getId() < notifications[index]->getId())
if (util::extractNumber(notification->getId()) < util::extractNumber(notifications[index]->getId()))
{
notification = notifications[index];
}