mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-11-22 16:06:21 -05:00
update nodes and edges after removals
This commit is contained in:
parent
66c011caca
commit
9e48e6ce95
1 changed files with 8 additions and 4 deletions
|
|
@ -336,10 +336,9 @@ export default {
|
|||
},
|
||||
processNewNodes(newNodes) {
|
||||
|
||||
// update nodes
|
||||
// determine old and new nodes
|
||||
const oldNodeIds = this.nodes.map((node) => node.id);
|
||||
const newNodeIds = newNodes.map((node) => node.id);
|
||||
this.nodes.update(newNodes);
|
||||
|
||||
// log new nodes
|
||||
for(const newNodeId of newNodeIds){
|
||||
|
|
@ -356,13 +355,15 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
// update nodes
|
||||
this.nodes.update(newNodes);
|
||||
|
||||
},
|
||||
processNewEdges(newEdges) {
|
||||
|
||||
// update edges
|
||||
// determine old and new edges
|
||||
const oldEdgeIds = this.edges.map((edge) => edge.id);
|
||||
const newEdgeIds = newEdges.map((edge) => edge.id);
|
||||
this.edges.update(newEdges);
|
||||
|
||||
// log new edges
|
||||
for(const newEdgeId of newEdgeIds){
|
||||
|
|
@ -379,6 +380,9 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
// update edges
|
||||
this.edges.update(newEdges);
|
||||
|
||||
},
|
||||
formatBytes: function(bytes) {
|
||||
return Utils.formatBytes(bytes);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue