Skip to content

Commit 675b851

Browse files
committed
fix: update claim menu to always include checks and adjust icon based on overall status
1 parent 2c8e0db commit 675b851

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

Pareto/Checks/Claim.swift

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,20 @@ class Claim: Hashable {
4646
let item = NSMenuItem(title: title, action: nil, keyEquivalent: "")
4747
let submenu = NSMenu()
4848
for check in checksSorted {
49-
if check.isRunnableCached() {
50-
submenu.addItem(check.menu())
51-
if Defaults[.snoozeTime] > 0 {
52-
item.image = NSImage.SF(name: "shield.fill").tint(color: .systemGray)
53-
} else {
54-
if checksPassed && checksNoError {
55-
item.image = NSImage.SF(name: "checkmark.circle.fill").tint(color: Defaults.OKColor())
56-
} else {
57-
item.image = NSImage.SF(name: "xmark.diamond.fill").tint(color: Defaults.FailColor())
58-
}
59-
}
49+
let checkMenuItem = check.menu()
50+
51+
// Always add the check to the menu
52+
submenu.addItem(checkMenuItem)
53+
}
54+
55+
// Set the claim icon based on overall status
56+
if Defaults[.snoozeTime] > 0 {
57+
item.image = NSImage.SF(name: "shield.fill").tint(color: .systemGray)
58+
} else {
59+
if checksPassed && checksNoError {
60+
item.image = NSImage.SF(name: "checkmark.circle.fill").tint(color: Defaults.OKColor())
61+
} else {
62+
item.image = NSImage.SF(name: "xmark.diamond.fill").tint(color: Defaults.FailColor())
6063
}
6164
}
6265

Pareto/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</dict>
2727
</array>
2828
<key>CFBundleVersion</key>
29-
<string>6134</string>
29+
<string>6140</string>
3030
<key>LSApplicationCategoryType</key>
3131
<string>public.app-category.utilities</string>
3232
<key>LSMinimumSystemVersion</key>

0 commit comments

Comments
 (0)