exelban / stats

macOS system monitor in your menu bar
MIT License
23.54k stars 779 forks source link

Network: Widget Activation Threshold is applied backwards #1958

Closed cjthompson closed 1 month ago

cjthompson commented 2 months ago

This logic is backwards.

I presume that the feature is "If the current upload or download value in bytes is LESS THAN the threshold value, then display 0"

Currently, the logic is applied backwards. The upload and download values are set to 0 if they a GREATER than the threshold. If you set "Widget Activation Threshold" to "1 Byte", the widget will always display "0".

https://github.com/exelban/stats/blob/e2c4f12936800820d19e823f0417f40e889867ad/Modules/Net/main.swift#L223

The logic was reversed in this commit

Screenshot 2024-05-21 at 8 14 26 AM

exelban commented 2 months ago

hi. Thanks for the feedback. Yeap, looks like I messed up with that( Will be fixed.