Skip to content

Commit

Permalink
Sensors@claudiux: Remove unnecessary coroutine
Browse files Browse the repository at this point in the history
applet.reapSensors is already calling reap_nvidia_sensors so the additional loop is not required.
Applet author: @claudiux
References: #6078
  • Loading branch information
JEleniel committed Oct 11, 2024
1 parent 01a0c6e commit 46ef541
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Sensors@claudiux/files/Sensors@claudiux/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ class SensorsApplet extends Applet.TextApplet {
}

this.loopId = Mainloop.timeout_add(this.interval * 1000, () => this.reap_sensors());
this.nvidiaLoopId = Mainloop.timeout_add(this.interval * 1000, () => this.reap_nvidia_smi());
return false
}

Expand Down Expand Up @@ -1462,10 +1461,6 @@ class SensorsApplet extends Applet.TextApplet {
Mainloop.source_remove(this.loopId);
this.loopId = 0;
}
if (this.nvidiaLoopId != undefined && this.nvidiaLoopId > 0) {
Mainloop.source_remove(this.nvidiaLoopId);
this.nvidiaLoopId = 0;
}
this.detect_markup();
this.isLooping = true;
this.reap_sensors();
Expand All @@ -1488,10 +1483,6 @@ class SensorsApplet extends Applet.TextApplet {
Mainloop.source_remove(this.loopId);
this.loopId = 0;
}
if (this.nvidiaLoopId != undefined && this.nvidiaLoopId > 0) {
Mainloop.source_remove(this.nvidiaLoopId);
this.nvidiaLoopId = 0;
}

if (this.checkDepInterval && (this.checkDepInterval != 0)) {
clearInterval(this.checkDepInterval);
Expand Down

0 comments on commit 46ef541

Please sign in to comment.