-
-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use getNeighbors
method
#1146
Conversation
Pull Request Test Coverage Report for Build 831846415
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this makes sense - the entire reason why I'm going to remove the neighbors property is because it is almost impossible to keep up to date. Moving nodes, including/excluding nodes, pulling plugs, etc. - all these can change the neighbors a node sees. And it all happens on the Z-Wave protocol level, so we don't get notified.
AFAIK you only use it when generating the map, so before doing that, you should request all neighbors for all nodes and use this fresh information for the map.
I already did that in refreshNeighbors method, I think that keeping them on nodes is not so wrong, at least I could show a map and then once the refresh ends I update it? |
It may lead someone to believe that the node property is reliable though - maybe even get cached somewhere. If there's only a method to retrieve the current list, it is much clearer that it has to be retrieved fresh.
I don't see where it is used in the frontend. However I don't think it is bad UX to request the neighbors and show the map with up2date neighbors 200ms later. |
Ok so I will remove |
No description provided.