78ba61034f
- Remove .toolbarBackground(.visible) from all NavigationStack views: this modifier suppresses large title rendering in iOS 26. - Discover: switch to always-present List + overlay pattern so SwiftUI never loses the scroll context during loading transitions. - Discover, Notifications, Groups: use .inline title mode; the tab bar already identifies these screens, large titles are redundant. - RootView: add .toolbarColorScheme propagation for nav bar foreground. - Settings sheet: apply theme background and toolbar color to the Form.
46 lines
1.6 KiB
Swift
46 lines
1.6 KiB
Swift
import SwiftUI
|
|
|
|
struct OwnProfileView: View {
|
|
@AppStorage("publicFeedURL") private var publicFeedURLString = ""
|
|
@State private var showSettings = false
|
|
@Environment(\.appTheme) private var theme
|
|
|
|
private var feedURL: URL? {
|
|
guard let url = URL(string: publicFeedURLString),
|
|
url.scheme?.hasPrefix("http") == true,
|
|
url.host != nil else { return nil }
|
|
return url
|
|
}
|
|
|
|
var body: some View {
|
|
NavigationStack {
|
|
Group {
|
|
if let url = feedURL {
|
|
ProfileView(feedURL: url)
|
|
} else {
|
|
ContentUnavailableView {
|
|
Label("No profile", systemImage: "person.slash")
|
|
} description: {
|
|
Text("Set your Feed URL in Settings to see your profile.")
|
|
} actions: {
|
|
Button("Open Settings") { showSettings = true }
|
|
.buttonStyle(.bordered)
|
|
}
|
|
}
|
|
}
|
|
.background(theme.background)
|
|
.navigationTitle("Profile")
|
|
.navigationBarTitleDisplayMode(.large)
|
|
.toolbarBackground(theme.secondaryBackground, for: .navigationBar)
|
|
.toolbar {
|
|
ToolbarItem(placement: .navigationBarTrailing) {
|
|
Button { showSettings = true } label: {
|
|
Image(systemName: "gearshape")
|
|
}
|
|
}
|
|
}
|
|
.sheet(isPresented: $showSettings) { SettingsView() }
|
|
}
|
|
}
|
|
}
|