Unwatched videos in subscriptions

This commit is contained in:
Arkadiusz Fal
2022-12-13 00:39:50 +01:00
parent 02b30394ed
commit 8c1d900a63
8 changed files with 154 additions and 17 deletions

View File

@@ -1,16 +1,11 @@
import SwiftUI
extension Backport where Content: View {
@ViewBuilder func badge(_ count: Text) -> some View {
@ViewBuilder func badge(_ count: Text?) -> some View {
if #available(iOS 15.0, macOS 12.0, tvOS 15.0, *) {
content.badge(count)
} else {
HStack {
content
Spacer()
Text("\(count)")
.foregroundColor(.secondary)
}
content
}
}
}