diff --git a/RTSDA.xcodeproj/project.pbxproj b/RTSDA.xcodeproj/project.pbxproj index 5f31d32..a901a54 100644 --- a/RTSDA.xcodeproj/project.pbxproj +++ b/RTSDA.xcodeproj/project.pbxproj @@ -505,7 +505,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = RTSDA.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_ASSET_PATHS = "\"Preview Content\""; DEVELOPMENT_TEAM = TQMND62F2W; ENABLE_PREVIEWS = YES; @@ -548,7 +548,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = RTSDA.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_ASSET_PATHS = "\"Preview Content\""; DEVELOPMENT_TEAM = TQMND62F2W; ENABLE_PREVIEWS = YES; diff --git a/Views/BulletinView.swift b/Views/BulletinView.swift index 7132d07..74b15a5 100644 --- a/Views/BulletinView.swift +++ b/Views/BulletinView.swift @@ -241,7 +241,7 @@ struct BulletinDetailView: View { .padding(.horizontal) // PDF Download Button - if !bulletin.pdfUrl.isEmpty { + if let pdf = bulletin.pdf, !pdf.isEmpty { if let url = URL(string: bulletin.pdfUrl) { Button(action: { UIApplication.shared.open(url) diff --git a/Views/BulletinViews.swift b/Views/BulletinViews.swift index 8a7b2e2..694b7f5 100644 --- a/Views/BulletinViews.swift +++ b/Views/BulletinViews.swift @@ -52,47 +52,6 @@ struct BulletinListView: View { } } -struct BulletinDetailView: View { - let bulletin: Bulletin - @Environment(\.dismiss) private var dismiss - - var body: some View { - ScrollView { - VStack(alignment: .leading, spacing: 20) { - // Header - VStack(alignment: .leading, spacing: 8) { - Text(bulletin.date.formatted(date: .long, time: .omitted)) - .font(.subheadline) - .foregroundColor(.secondary) - - Text(bulletin.title) - .font(.title) - .fontWeight(.bold) - } - - // PDF Download Button - if let pdfUrl = bulletin.pdfUrl, let url = URL(string: pdfUrl) { - Link(destination: url) { - Label("Download PDF", systemImage: "doc.fill") - .frame(maxWidth: .infinity) - .padding() - .background(Color.blue) - .foregroundColor(.white) - .cornerRadius(10) - } - } - - // Sections - ForEach(bulletin.sections, id: \.title) { section in - BulletinSectionView(section: section) - } - } - .padding() - } - .navigationBarTitleDisplayMode(.inline) - } -} - struct BulletinSectionView: View { let section: BulletinSection @@ -181,7 +140,7 @@ struct BulletinRowView: View { .font(.headline) .lineLimit(2) - if bulletin.pdfUrl != nil { + if let pdf = bulletin.pdf, !pdf.isEmpty { Label("PDF Available", systemImage: "doc.fill") .font(.caption) .foregroundColor(.blue)