diff --git a/ios/Stemify/UI/Components/Chrome.swift b/ios/Stemify/UI/Components/Chrome.swift index fe4d4f8..6d3cda1 100644 --- a/ios/Stemify/UI/Components/Chrome.swift +++ b/ios/Stemify/UI/Components/Chrome.swift @@ -315,11 +315,14 @@ struct HingeEdge: ViewModifier { struct Page: View { let title: String var large = true + /// Moves the content up into an empty nav bar. + var pullUp: CGFloat = 0 @ViewBuilder let content: () -> Content @Environment(\.palette) private var p var body: some View { ScrollView { LazyVStack(alignment: .leading, spacing: 0) { content() } + .padding(.top, -pullUp) .padding(.bottom, 24) } .modifier(HingeEdge()) diff --git a/ios/Stemify/UI/Screens/PlaylistScreens.swift b/ios/Stemify/UI/Screens/PlaylistScreens.swift index d2d45c5..b7c4cf6 100644 --- a/ios/Stemify/UI/Screens/PlaylistScreens.swift +++ b/ios/Stemify/UI/Screens/PlaylistScreens.swift @@ -143,7 +143,7 @@ struct StemPlaylistScreen: View { .navigationTitle(pl.title) .navigationBarTitleDisplayMode(.inline) } else { - Page(title: pl.title, large: false) { + Page(title: pl.title, large: false, pullUp: BAR_PULL) { header(pl) if pl.items.isEmpty { EmptyState(icon: "slider.horizontal.3", title: "No Songs", @@ -164,7 +164,7 @@ struct StemPlaylistScreen: View { else { MoreMenu(items: moreItems(pl)) } } } - .modifier(SplitHidesTitle()) + .modifier(SplitHidesTitle(bare: !editing)) } private func header(_ pl: StemPlaylist) -> some View { @@ -279,7 +279,7 @@ struct PlaylistScreen: View { .navigationTitle(title) .navigationBarTitleDisplayMode(.inline) } else { - Page(title: title, large: false) { + Page(title: title, large: false, pullUp: BAR_PULL) { header(list) Loaded(state: tracks, retry: { reload += 1 }) { list in ForEach(Array(list.enumerated()), id: \.element.id) { i, t in @@ -297,7 +297,7 @@ struct PlaylistScreen: View { else { MoreMenu(items: moreItems(list)) } } } - .modifier(SplitHidesTitle()) + .modifier(SplitHidesTitle(bare: !editing)) .task(id: reload) { await LoadState.load($tracks) { try await g.plex.playlistTracks(playlist.ratingKey) } } @@ -426,11 +426,16 @@ struct SearchScreen: View { } /// Split at the Duo's hinge the pane's own header already names the playlist, so the bar drops the title. +/// How far a playlist page's header rides up into the empty nav bar, between back and •••. +private let BAR_PULL: CGFloat = 40 + +/// Hides the bar title in split view, and while [bare] (the header already shows it). private struct SplitHidesTitle: ViewModifier { + var bare = false @Environment(Ui.self) private var ui func body(content: Content) -> some View { content.toolbar { - if ui.split { ToolbarItem(placement: .principal) { Color.clear.frame(width: 1, height: 1) } } + if ui.split || bare { ToolbarItem(placement: .principal) { Color.clear.frame(width: 1, height: 1) } } } } } diff --git a/ios/project.yml b/ios/project.yml index 6497a0c..ff2dd31 100644 --- a/ios/project.yml +++ b/ios/project.yml @@ -9,7 +9,7 @@ settings: # iOS needs a plain number for the bundle version; the label is what the app and releases show. MARKETING_VERSION: "0.10.1" VERSION_LABEL: "0.10.1" - CURRENT_PROJECT_VERSION: "63" + CURRENT_PROJECT_VERSION: "64" # Dev builds override these (build-ipa.sh dev) so they install next to the release app. APP_ID: org.cdnutter.stemify APP_NAME: Stemify