mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-05-08 20:28:03 +00:00
Hotfix pins
This commit is contained in:
@@ -39,7 +39,7 @@ export default class App extends React.Component<{}, State> {
|
||||
const { nodes, sortedNodes } = this.state;
|
||||
|
||||
for (const node of nodes.values()) {
|
||||
node.pinned = pins.has(node.name);
|
||||
node.setPinned(pins.has(node.name));
|
||||
}
|
||||
|
||||
this.setState({ nodes, pins, sortedNodes: sortedNodes.sort(Node.compare) });
|
||||
|
||||
@@ -119,6 +119,13 @@ export class Node {
|
||||
}
|
||||
}
|
||||
|
||||
public setPinned(pinned: boolean) {
|
||||
if (this.pinned !== pinned) {
|
||||
this.pinned = pinned;
|
||||
this.trigger();
|
||||
}
|
||||
}
|
||||
|
||||
public subscribe(handler: (node: Node) => void) {
|
||||
this.subscribtions.add(handler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user