mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-03-30 13:35:42 +00:00
fix: apply observation sort on all code paths that set _children
Sort was only applied in pktToggleGroup and dropdown change handler. Missing from: loadPackets restore (re-fetches children for expanded groups) and WS update path (unshifts new observations). Now all three paths call sortGroupChildren after modifying _children.
This commit is contained in:
@@ -84,7 +84,7 @@
|
||||
<script src="hop-resolver.js?v=1774126708"></script>
|
||||
<script src="app.js?v=1774126708"></script>
|
||||
<script src="home.js?v=1774042199"></script>
|
||||
<script src="packets.js?v=1774136484"></script>
|
||||
<script src="packets.js?v=1774136790"></script>
|
||||
<script src="map.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="channels.js?v=1774331200" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
<script src="nodes.js?v=1774126708" onerror="console.error('Failed to load:', this.src)"></script>
|
||||
|
||||
@@ -280,6 +280,7 @@
|
||||
// Update expanded children if this group is expanded
|
||||
if (expandedHashes.has(h) && existing._children) {
|
||||
existing._children.unshift(p);
|
||||
sortGroupChildren(existing);
|
||||
}
|
||||
} else {
|
||||
// New group
|
||||
@@ -366,6 +367,7 @@
|
||||
try {
|
||||
const childData = await api(`/packets?hash=${hash}&limit=20`);
|
||||
group._children = childData.packets || [];
|
||||
sortGroupChildren(group);
|
||||
} catch {}
|
||||
} else {
|
||||
// Group no longer in results — remove from expanded
|
||||
|
||||
Reference in New Issue
Block a user