Ferrite-backup/Ferrite/Views/CommonViews/InlineHeader.swift
kingbri 8306ca1f9b Ferrite: Clean up UI changes
- Migrate the empty view to a common view which vertically centers
itself to the screen's bounds

- Don't initialize underlying state variables in init as this is
discouraged behavior. Instead, hook the source list editor to an ID
that refreshes when an existing source list URL has been set

Signed-off-by: kingbri <bdashore3@proton.me>
2022-09-07 09:51:01 -04:00

29 lines
581 B
Swift

//
// InlineHeader.swift
// Ferrite
//
// Created by Brian Dashore on 9/5/22.
//
// For iOS 15's weird defaults regarding sectioned list padding
//
import SwiftUI
struct InlineHeader: View {
let title: String
init(_ title: String) {
self.title = title
}
var body: some View {
if #available(iOS 16, *) {
Text(title)
} else if #available(iOS 15, *) {
Text(title)
.listRowInsets(EdgeInsets(top: 10, leading: 15, bottom: 0, trailing: 0))
} else {
Text(title)
}
}
}