Skip to content

Commit

Permalink
feat(artist): improve placeholder triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan committed Jul 21, 2021
1 parent f417cda commit 377c856
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions firstfm/Views/Artist/ArtistView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ struct ArtistView: View {
VStack(alignment: .leading) {
ArtistInfoView(artistInfo: model.artist, artist: artist)
.padding()
.redacted(reason: model.isLoading ? .placeholder : [])
.redacted(reason: model.artist == nil ? .placeholder : [])

TopArtistTracksView(tracks: model.tracks)
.frame(
width: g.size.width - 5,
height: g.size.height * 0.7,
alignment: .center
)
.redacted(reason: model.isLoading ? .placeholder : [])
.redacted(reason: model.tracks.isEmpty ? .placeholder : [])

TopArtistAlbumsView(albums: model.albums).offset(y: -50)
.redacted(reason: model.isLoading ? .placeholder : [])
.redacted(reason: model.albums.isEmpty ? .placeholder : [])

SimilarArtistsView(similarArtists: model.artist?.similar.artist ?? [])
.offset(y: -30)
.redacted(reason: model.isLoading ? .placeholder : [])
.redacted(reason: model.artist == nil ? .placeholder : [])

}.padding(.top, 10)
.onAppear {
Expand Down

0 comments on commit 377c856

Please sign in to comment.