feat: cleaned up Speed widget by refactoring download/upload to input/output to make better logic for both modules: Disk and Network which have different meanings for these values.

This commit is contained in:
Serhiy Mytrovtsiy
2024-10-26 16:11:39 +02:00
parent 68c45ab604
commit 905ce8fa3d
6 changed files with 156 additions and 132 deletions

View File

@@ -234,7 +234,7 @@ public class Network: Module {
self.menuBar.widgets.filter{ $0.isActive }.forEach { (w: SWidget) in
switch w.item {
case let widget as SpeedWidget: widget.setValue(upload: upload, download: download)
case let widget as SpeedWidget: widget.setValue(input: download, output: upload)
case let widget as NetworkChart: widget.setValue(upload: Double(upload), download: Double(download))
case let widget as TextWidget:
var text = self.textValue