Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove ArchiveCategory.classic and its tab #838

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Sources/Site/Music/UI/ArchiveCategory+FormatStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ extension ArchiveCategory.FormatStyle: Foundation.FormatStyle {
return "/venues/stats.html"
case .artists:
return "/bands/stats.html"
case .classic:
return ""
}
}
}
Expand Down
7 changes: 0 additions & 7 deletions Sources/Site/Music/UI/ArchiveCategory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public enum ArchiveCategory: String, CaseIterable {
case shows
case venues
case artists
case classic

static var defaultCategory: ArchiveCategory? { nil }

Expand All @@ -29,8 +28,6 @@ public enum ArchiveCategory: String, CaseIterable {
return String(localized: "Venues", bundle: .module)
case .artists:
return String(localized: "Artists", bundle: .module)
case .classic:
return String(localized: "Classic", bundle: .module)
}
}

Expand All @@ -46,8 +43,6 @@ public enum ArchiveCategory: String, CaseIterable {
Label(self.localizedString, systemImage: "music.note.house")
case .artists:
Label(self.localizedString, systemImage: "music.mic")
case .classic:
Label(self.localizedString, systemImage: "clock.arrow.circlepath")
}
}

Expand All @@ -63,8 +58,6 @@ public enum ArchiveCategory: String, CaseIterable {
return String(localized: "Show Venues", bundle: .module)
case .artists:
return String(localized: "Show Artists", bundle: .module)
case .classic:
preconditionFailure()
}
}
}
2 changes: 0 additions & 2 deletions Sources/Site/Music/UI/ArchiveCategoryDetail.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ struct ArchiveCategoryDetail: View {
searchString: $artistSearchString
)
.locationFilter(nearbyModel, filteredDataIsEmpty: artistDigests.isEmpty)
case .classic:
preconditionFailure()
}
}
.shareActivity(for: category, vault: vault, isActive: isCategoryActive)
Expand Down
4 changes: 1 addition & 3 deletions Sources/Site/Music/UI/ArchiveCategorySplit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct ArchiveCategorySplit: View {
@MainActor
@ViewBuilder var sidebar: some View {
List(
ArchiveCategory.allCases.filter { $0 != .classic }, id: \.self,
ArchiveCategory.allCases, id: \.self,
selection: $archiveNavigation.selectedCategory
) {
category in
Expand All @@ -39,8 +39,6 @@ struct ArchiveCategorySplit: View {
Text(vault.venueDigests.count.formatted(.number))
case .artists:
Text(vault.artistDigests.count.formatted(.number))
case .classic:
preconditionFailure()
}
} label: {
category.label
Expand Down
12 changes: 3 additions & 9 deletions Sources/Site/Music/UI/ArchiveStateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,9 @@ struct ArchiveStateView: View {
}

@ViewBuilder private var archiveBody: some View {
#if os(iOS)
ArchiveTabView(
model: model, venueSort: $venueSort, artistSort: $artistSort,
archiveNavigation: archiveNavigation, nearbyModel: nearbyModel)
#elseif os(tvOS) || os(macOS)
ArchiveCategorySplit(
model: model, venueSort: $venueSort, artistSort: $artistSort,
archiveNavigation: archiveNavigation, nearbyModel: nearbyModel)
#endif
ArchiveCategorySplit(
model: model, venueSort: $venueSort, artistSort: $artistSort,
archiveNavigation: archiveNavigation, nearbyModel: nearbyModel)
}

var body: some View {
Expand Down
35 changes: 0 additions & 35 deletions Sources/Site/Music/UI/ArchiveTabView.swift

This file was deleted.

3 changes: 0 additions & 3 deletions Sources/Site/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@
},
"Check again tomorrow." : {

},
"Classic" : {

},
"Comment" : {

Expand Down