From 8764c4bf5fbda44d024a297e0a93a69dd7aeb740 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Sat, 19 Nov 2022 19:54:02 +0100 Subject: [PATCH] fix: fixed disk bar updates. It wasn't active( --- Modules/Disk/popup.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Disk/popup.swift b/Modules/Disk/popup.swift index aaf6557f..67835dea 100644 --- a/Modules/Disk/popup.swift +++ b/Modules/Disk/popup.swift @@ -135,11 +135,11 @@ internal class DiskView: NSStackView { public func updateFree(free: Int64) { self.nameView.update(free: free, read: nil, write: nil) self.legendView.update(free: free) + self.barView.update(free: free) } public func updateReadWrite(read: Int64, write: Int64) { self.nameView.update(free: nil, read: read, write: write) self.chartView.update(read: read, write: write) - self.barView.update(free: nil, read: read, write: write) } } @@ -325,7 +325,7 @@ internal class BarView: NSView { self.background?.layer?.backgroundColor = self.isDarkMode ? NSColor.lightGray.withAlphaComponent(0.1).cgColor : NSColor.white.cgColor } - public func update(free: Int64?, read: Int64?, write: Int64?) { + public func update(free: Int64?) { if (self.window?.isVisible ?? false) || !self.ready { if let free = free, self.usedBarSpace != nil { let percentage = CGFloat(self.size - free) / CGFloat(self.size)