fix(menubar): 修正进程退出判断与公网刷新及风扇语言
This commit is contained in:
@@ -2,6 +2,13 @@ import Foundation
|
||||
|
||||
/// Compute once per data/filter/sort event, never from row rendering or scroll position.
|
||||
nonisolated enum ProcessTableProjection {
|
||||
/// Filtering hides rows without terminating processes. A failed read proves no departure.
|
||||
static func exitedSelection(_ selected: ProcessIdentity?, in snapshot: ProcessSnapshot?) -> ProcessIdentity? {
|
||||
guard let selected, let snapshot, !snapshot.failed,
|
||||
!snapshot.rows.contains(where: { $0.id == selected }) else { return nil }
|
||||
return selected
|
||||
}
|
||||
|
||||
static func rows(_ input: [ProcessMetrics], query: String, sorting: [ProcessSort], order: [ProcessIdentity]) -> [ProcessMetrics] {
|
||||
let ranks = Dictionary(uniqueKeysWithValues: order.enumerated().map { ($0.element, $0.offset) })
|
||||
return input.filter {
|
||||
|
||||
Reference in New Issue
Block a user