perf(ui): 移除监控动效并精简原生图表绘制
This commit is contained in:
@@ -6,13 +6,6 @@ nonisolated enum PanelCurveGeometry {
|
||||
let value: Double
|
||||
}
|
||||
|
||||
static func isAppend(from old: [Date], to new: [Date], maximumGap: TimeInterval = 5) -> Bool {
|
||||
guard old.count > 1, let previous = old.last, let next = new.last,
|
||||
next > previous, next.timeIntervalSince(previous) <= maximumGap else { return false }
|
||||
if new.count == old.count + 1 { return Array(new.dropLast()) == old }
|
||||
return new.count == old.count && Array(old.dropFirst()) == Array(new.dropLast())
|
||||
}
|
||||
|
||||
static func allowedGap(at index: Int, intervals: [TimeInterval], fallback: TimeInterval) -> TimeInterval {
|
||||
guard index > 0, index < intervals.count else { return fallback }
|
||||
let pair = [intervals[index - 1], intervals[index]].filter { $0.isFinite && $0 > 0 }
|
||||
|
||||
Reference in New Issue
Block a user