Show all search result types
This commit is contained in:
1 parent
74872549b0
commit
31783b1bb1
2 files changed
+71
-98
No files matched your search
@@ -10,6 +10,7 @@ struct TrackRowView: View {
|
||||
let index: Int
|
||||
var hidesAlbumAction = false
|
||||
var showsArtwork = false
|
||||
var subtitlePrefix: String? = nil
|
||||
var onPlayOnlyThis: (() -> Void)? = nil
|
||||
var onPlay: (() -> Void)? = nil
|
||||
|
||||
@@ -46,16 +47,27 @@ struct TrackRowView: View {
|
||||
.font(.body)
|
||||
.foregroundStyle(.primary)
|
||||
.lineLimit(1)
|
||||
if !artists.isEmpty {
|
||||
if !artists.isEmpty || subtitlePrefix != nil {
|
||||
HStack(spacing: 4) {
|
||||
ForEach(artists) { artist in
|
||||
NavigationLink(artist.name) {
|
||||
ArtistDetailView(artistID: artist.id)
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
if artist.id != artists.last?.id {
|
||||
Text(",").font(.caption).foregroundStyle(.secondary)
|
||||
if let subtitlePrefix {
|
||||
Text(subtitlePrefix)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
if artists.isEmpty {
|
||||
Text("Unknown Artist")
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
} else {
|
||||
ForEach(artists) { artist in
|
||||
NavigationLink(artist.name) {
|
||||
ArtistDetailView(artistID: artist.id)
|
||||
}
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
if artist.id != artists.last?.id {
|
||||
Text(",").font(.caption).foregroundStyle(.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user