terminal slow
This commit is contained in:
@@ -5,12 +5,10 @@ import SwiftUI
|
||||
enum TabBadge {
|
||||
case none
|
||||
case count(Int, String)
|
||||
case spinner
|
||||
}
|
||||
|
||||
struct TabBadgeView: View {
|
||||
let badge: TabBadge
|
||||
@Environment(\.paneAccent) private var accent
|
||||
|
||||
var body: some View {
|
||||
switch badge {
|
||||
@@ -19,9 +17,6 @@ struct TabBadgeView: View {
|
||||
case .count(let n, let help):
|
||||
Badge(count: n)
|
||||
.help(help)
|
||||
case .spinner:
|
||||
Spinner(color: accent)
|
||||
.help("review in progress")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,10 +371,7 @@ private struct TabStrip: View {
|
||||
}
|
||||
|
||||
func badge(_ t: TaskTab) -> TabBadge {
|
||||
if t == .reviews && reviewing {
|
||||
return .spinner
|
||||
}
|
||||
return count(t) > 0 ? .count(count(t), t == .inbox ? "inbox items" : "open findings in the latest review") : .none
|
||||
count(t) > 0 ? .count(count(t), t == .inbox ? "inbox items" : "open findings in the latest review") : .none
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user