Commit 53dc6c6bfd
Verified · cmc
Sources/OrgstarMobile/ExportMenu.swift +5 −3 · view
| @@ -184,7 +184,7 @@ struct ExportScreen: View { | ||
| 184 | 184 | |
| 185 | 185 | var body: some View { |
| 186 | 186 | NavigationStack { |
| 187 | List { ExportItems(path: path, tree: tree, report: report) } | |
| 187 | List { ExportItems(path: path, tree: tree, report: report, dividers: false) } | |
| 188 | 188 | .navigationTitle("Export") |
| 189 | 189 | .navigationBarTitleDisplayMode(.inline) |
| 190 | 190 | .toolbar { ToolbarItem(placement: .confirmationAction) { Button("Done") { dismiss() } } } |
| @@ -201,6 +201,8 @@ struct ExportItems: View { | ||
| 201 | 201 | var report: (String) -> Void = { _ in } |
| 202 | 202 | /// Offers the subtree at the caret alone, where there is a caret. |
| 203 | 203 | var exportSubtree: (() -> Void)? |
| 204 | /// Dividers between the groups, as a menu draws them; a list already separates its rows. | |
| 205 | var dividers = true | |
| 204 | 206 | /// Every file's export settings as kept, so the menu follows a change to this file's. |
| 205 | 207 | @AppStorage(ExportSettings.key) private var kept = Data() |
| 206 | 208 | |
| @@ -226,7 +228,7 @@ struct ExportItems: View { | ||
| 226 | 228 | Button("Export Subtree…", systemImage: "list.bullet.indent") { exportSubtree() } |
| 227 | 229 | } |
| 228 | 230 | if let calendars = AgendaCalendars(model: model) { |
| 229 | Divider() | |
| 231 | if dividers { Divider() } | |
| 230 | 232 | if OrgExport.Format.icalendar.locked { |
| 231 | 233 | Button("\(String(localized: "Export Agenda Files to iCalendar")) (orgstar+)", systemImage: "calendar") { ProAccess.shared.allows(.export) } |
| 232 | 234 | } else { |
| @@ -236,7 +238,7 @@ struct ExportItems: View { | ||
| 236 | 238 | } |
| 237 | 239 | } |
| 238 | 240 | } |
| 239 | Divider() | |
| 241 | if dividers { Divider() } | |
| 240 | 242 | if ProAccess.shared.isUnlocked { |
| 241 | 243 | Button("Copy as Rich Text", systemImage: "doc.on.doc") { report(Self.copy(path: path, text: text, theme: model.theme)) } |
| 242 | 244 | } else { |