Skip to content

Commit

Permalink
remove ArchiveCategory.classic and its tab (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
bolsinga authored Aug 27, 2024
1 parent 1f70de9 commit d14829e
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 61 deletions.
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

0 comments on commit d14829e

Please sign in to comment.