Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jul 23, 2024
1 parent fe0fc00 commit 7c25fac
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/Tray.js
Original file line number Diff line number Diff line change
Expand Up @@ -1683,14 +1683,18 @@ class NetworkTray extends Tray {
this.downloadData()
.then(downloaded => {
// Update the current tray with the downloaded data
Object.assign(this, downloaded);
this.updateAppearance();
this.updateNetworkInfo();
let parent = this.element.parentElement.__trayInstance
this.deleteTray();
parent.appendChild(downloaded)

// Object.assign(this, downloaded);
// this.updateAppearance();
// this.updateNetworkInfo();
// If there are children, recursively update them
this.children.forEach((child, index) => {
Object.assign(child, downloaded.children[index]);
child.updateAppearance();
});
// this.children.forEach((child, index) => {
// Object.assign(child, downloaded.children[index]);
// child.updateAppearance();
// });
})
.catch(error => {
console.error('Download failed:', error);
Expand Down

0 comments on commit 7c25fac

Please sign in to comment.