From 11aba60109a4942c6b4a60762a05d72a00edd191 Mon Sep 17 00:00:00 2001 From: droideparanoico Date: Wed, 15 Jul 2026 11:10:57 +0200 Subject: [PATCH] Type toggle targets artist row --- src/main/java/io/discdrop/resource/ArtistResource.java | 5 ++++- src/main/resources/templates/artists.html | 6 +++++- src/main/resources/templates/fragments/artist-row.html | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/discdrop/resource/ArtistResource.java b/src/main/java/io/discdrop/resource/ArtistResource.java index abd569b..e435ba8 100644 --- a/src/main/java/io/discdrop/resource/ArtistResource.java +++ b/src/main/java/io/discdrop/resource/ArtistResource.java @@ -100,7 +100,10 @@ public class ArtistResource { @FormParam("enabled") boolean enabled) { artistService.setTypeEnabled(mbid, primaryType, enabled); CompletableFuture.runAsync(() -> syncService.resyncArtist(mbid)); - return feedFragment(0, true); + FollowedArtist artist = artistService.findArtist(mbid); + List settings = artist != null ? artistService.settingsFor(artist) : List.of(); + return fragments_artist_row.data("artist", artist) + .data("settings", settings); } private TemplateInstance feedFragment(int offset, boolean autoRefresh) { diff --git a/src/main/resources/templates/artists.html b/src/main/resources/templates/artists.html index da7aff5..628d562 100644 --- a/src/main/resources/templates/artists.html +++ b/src/main/resources/templates/artists.html @@ -39,7 +39,11 @@ {#else} {#for artist in artists} -
+
{/for} diff --git a/src/main/resources/templates/fragments/artist-row.html b/src/main/resources/templates/fragments/artist-row.html index 7b568f9..945b660 100644 --- a/src/main/resources/templates/fragments/artist-row.html +++ b/src/main/resources/templates/fragments/artist-row.html @@ -9,7 +9,7 @@