mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: add a sensor value to the chart in the popup view even if the popup is closed
This commit is contained in:
@@ -97,11 +97,11 @@ public class LineChartView: NSView {
|
||||
underLinePath.fill()
|
||||
}
|
||||
|
||||
public func addValue(_ value: Double) {
|
||||
public func addValue(_ value: Double, redraw: Bool = true) {
|
||||
self.points.remove(at: 0)
|
||||
self.points.append(value)
|
||||
|
||||
if self.window?.isVisible ?? true {
|
||||
if redraw && self.window?.isVisible ?? true {
|
||||
self.display()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user