Add compact list row styling for iOS channels view

Apply compact row styling to channel list items on iOS to reduce vertical spacing and improve visual density. Uses listRowSpacing(0) on iOS 15+ and custom insets for consistent padding across all iOS versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Arkadiusz Fal
2025-11-09 14:05:18 +01:00
parent 73d9581449
commit 757b4cb671

View File

@@ -66,6 +66,9 @@ struct ChannelsView: View {
Label("Unsubscribe", systemImage: "xmark.circle")
}
}
#if os(iOS)
.modifier(CompactListRowModifier())
#endif
}
#if os(tvOS)
.padding(.horizontal, 50)
@@ -184,6 +187,21 @@ struct ChannelsView: View {
}
}
#if os(iOS)
struct CompactListRowModifier: ViewModifier {
func body(content: Content) -> some View {
if #available(iOS 15.0, *) {
content
.listRowSpacing(0)
.listRowInsets(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16))
} else {
content
.listRowInsets(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16))
}
}
}
#endif
struct ChannelsView_Previews: PreviewProvider {
static var previews: some View {
NavigationView {