mirror of
https://github.com/yattee/yattee.git
synced 2025-11-13 05:38:45 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user