Eliminate some now-unneeded sorting

This commit is contained in:
Jonathan Bennett 2025-06-25 19:44:31 -05:00
parent 3dd77ace85
commit dbc67973c6

View File

@ -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) {