From dbc67973c6ea43f7d5bd911e9b3e7b7a77498af5 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Wed, 25 Jun 2025 19:44:31 -0500 Subject: [PATCH] Eliminate some now-unneeded sorting --- src/modules/CannedMessageModule.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index c00c84049..dd37f0dec 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -245,12 +245,15 @@ void CannedMessageModule::updateDestinationSelectionList() } } + /* As the nodeDB is sorted, can skip this step // Sort by favorite, then last heard std::sort(this->filteredNodes.begin(), this->filteredNodes.end(), [](const NodeEntry &a, const NodeEntry &b) { if (a.node->is_favorite != b.node->is_favorite) return a.node->is_favorite > b.node->is_favorite; return a.lastHeard < b.lastHeard; }); + */ + scrollIndex = 0; // Show first result at the top destIndex = 0; // Highlight the first entry if (nodesChanged && runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) {