mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-19 00:16:59 +00:00
Eliminate some now-unneeded sorting
This commit is contained in:
parent
3dd77ace85
commit
dbc67973c6
@ -245,12 +245,15 @@ void CannedMessageModule::updateDestinationSelectionList()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* As the nodeDB is sorted, can skip this step
|
||||||
// Sort by favorite, then last heard
|
// Sort by favorite, then last heard
|
||||||
std::sort(this->filteredNodes.begin(), this->filteredNodes.end(), [](const NodeEntry &a, const NodeEntry &b) {
|
std::sort(this->filteredNodes.begin(), this->filteredNodes.end(), [](const NodeEntry &a, const NodeEntry &b) {
|
||||||
if (a.node->is_favorite != b.node->is_favorite)
|
if (a.node->is_favorite != b.node->is_favorite)
|
||||||
return a.node->is_favorite > b.node->is_favorite;
|
return a.node->is_favorite > b.node->is_favorite;
|
||||||
return a.lastHeard < b.lastHeard;
|
return a.lastHeard < b.lastHeard;
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
scrollIndex = 0; // Show first result at the top
|
scrollIndex = 0; // Show first result at the top
|
||||||
destIndex = 0; // Highlight the first entry
|
destIndex = 0; // Highlight the first entry
|
||||||
if (nodesChanged && runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) {
|
if (nodesChanged && runState == CANNED_MESSAGE_RUN_STATE_DESTINATION_SELECTION) {
|
||||||
|
Loading…
Reference in New Issue
Block a user