From c4b9952d95338e8fa0d1b2e2b265cd365b38f406 Mon Sep 17 00:00:00 2001 From: pelgraine <140762863+pelgraine@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:06:37 +1100 Subject: [PATCH] updated contacts all view to display max contacts etc --- examples/companion_radio/ui-new/Contactsscreen.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/companion_radio/ui-new/Contactsscreen.h b/examples/companion_radio/ui-new/Contactsscreen.h index ce8e5cbe..8cc2c5a9 100644 --- a/examples/companion_radio/ui-new/Contactsscreen.h +++ b/examples/companion_radio/ui-new/Contactsscreen.h @@ -88,7 +88,7 @@ private: } } // Sort by last_advert_timestamp descending (most recently seen first) - // Simple insertion sort — fine for up to 400 entries on ESP32 + // Simple insertion sort — fine for up to 400 entries on ESP32 for (int i = 1; i < _filteredCount; i++) { uint16_t tmpIdx = _filteredIdx[i]; uint32_t tmpTs = _filteredTs[i]; @@ -180,8 +180,12 @@ public: snprintf(tmp, sizeof(tmp), "Contacts [%s]", filterLabel(_filter)); display.print(tmp); - // Count on right - snprintf(tmp, sizeof(tmp), "%d/%d", _filteredCount, (int)the_mesh.getNumContacts()); + // Count on right: All → total/max, filtered → matched/total + if (_filter == FILTER_ALL) { + snprintf(tmp, sizeof(tmp), "%d/%d", (int)the_mesh.getNumContacts(), MAX_CONTACTS); + } else { + snprintf(tmp, sizeof(tmp), "%d/%d", _filteredCount, (int)the_mesh.getNumContacts()); + } display.setCursor(display.width() - display.getTextWidth(tmp) - 2, 0); display.print(tmp);