Sidebar: Make badge bigger + limit to 99+

This commit is contained in:
Thomas Ricouard 2023-02-23 18:42:34 +01:00
parent 0db7ea897a
commit 8e99c195e0

View File

@ -44,12 +44,12 @@ struct SideBarView<Content: View>: View {
ZStack {
Circle()
.fill(.red)
Text(String(count))
Text(count > 99 ? "99+" : String(count))
.foregroundColor(.white)
.font(.caption2)
}
.frame(width: 20, height: 20)
.offset(x: 10, y: -10)
.frame(width: 24, height: 24)
.offset(x: 14, y: -14)
}
private var postButton: some View {