Skip to content

Commit a75fb9d

Browse files
committed
Fix storage bar color
Fix storage bar color
1 parent ec3cdb4 commit a75fb9d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/Support/Views/ButtonTemplateViews/ProgressBarItem.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,20 @@ struct ProgressBarItem: View {
6969
ProgressView(value: percentage , total: 120)
7070
.padding(.trailing, 14)
7171
.accessibilityHidden(true)
72+
.modify {
73+
if percentage >= 108 {
74+
// Show red bar if more than 90% of 120 points (108)
75+
$0
76+
.tint(.red)
77+
} else if notificationBadgeBool ?? false && percentage < 108 {
78+
// Show orange bar if optional storageLimit is reached and still below 90%
79+
$0
80+
.tint(.orange)
81+
} else {
82+
$0
83+
.tint(symbolColor)
84+
}
85+
}
7286

7387
}
7488
.accessibilityElement(children: .combine)

0 commit comments

Comments
 (0)