mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-31 23:21:06 +00:00
Add NodeDB::isFavorite, NodeDB::isFromOrToFavoritedNode
This commit is contained in:
@@ -1770,6 +1770,20 @@ void NodeDB::set_favorite(bool is_favorite, uint32_t nodeId)
|
||||
}
|
||||
}
|
||||
|
||||
bool NodeDB::isFavorite(uint32_t nodeId)
|
||||
{
|
||||
meshtastic_NodeInfoLite *lite = getMeshNode(nodeId);
|
||||
if (lite) {
|
||||
return lite->is_favorite;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool NodeDB::isFromOrToFavoritedNode(const meshtastic_MeshPacket &p)
|
||||
{
|
||||
return isFavorite(p.from) || isFavorite(p.to);
|
||||
}
|
||||
|
||||
void NodeDB::pause_sort(bool paused)
|
||||
{
|
||||
sortingIsPaused = paused;
|
||||
|
||||
Reference in New Issue
Block a user