added back the + for badge indicator

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-08-09 13:09:07 -05:00
parent a1e11a67a4
commit f6b01ac2a4

View File

@ -359,10 +359,15 @@ open class BadgeIndicator: View {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
text = formatter.string(from: .init(integerLiteral: maxBadgetCount))!
if let leadingCharacter {
if let leadingCharacter, !leadingCharacter.isEmpty {
text = "\(leadingCharacter)\(text)"
} else if maximumDigits.value < "\(badgeCount)".count {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
text = "\(text)+"
}
}
return text
}