Skip to content

Commit c74cd29

Browse files
Load artwork less often
1 parent 4521f7d commit c74cd29

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

swmpc/Views/Content/Destinations/Rows/AlbumView.swift

+10-10
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ struct AlbumView: View {
5858
#endif
5959
}
6060
#if os(macOS)
61-
.onHover(perform: { value in
62-
withAnimation(.interactiveSpring) {
63-
isHoveringArtwork = value
64-
}
65-
})
61+
.onHover(perform: { value in
62+
withAnimation(.interactiveSpring) {
63+
isHoveringArtwork = value
64+
}
65+
})
6666
#endif
67-
.onTapGesture {
68-
Task(priority: .userInitiated) {
69-
try? await ConnectionManager.command().play(album)
67+
.onTapGesture {
68+
Task(priority: .userInitiated) {
69+
try? await ConnectionManager.command().play(album)
70+
}
7071
}
71-
}
7272

7373
VStack(alignment: .leading) {
7474
Text(album.title)
@@ -86,7 +86,7 @@ struct AlbumView: View {
8686
.id(album.id)
8787
.contentShape(Rectangle())
8888
.task(id: album, priority: .medium) {
89-
guard !Task.isCancelled else {
89+
guard !Task.isCancelled, artwork == nil else {
9090
return
9191
}
9292

0 commit comments

Comments
 (0)