Skip to content

Commit 359e42b

Browse files
committed
ImageScSearcher: do not load remote icons
Firstly, this logic introduces an undesirable package dependency on the org.scijava.ui.swing.search package, which is AWT/Swing-specific. Secondly, loading the remote icons is expensive, and makes search results appear (especially in napari-imagej) too slowly.
1 parent 5945fc4 commit 359e42b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/scijava/search/web/ImageScSearcher.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
import org.scijava.plugin.Plugin;
5959
import org.scijava.search.SearchResult;
6060
import org.scijava.search.Searcher;
61-
import org.scijava.ui.swing.search.SwingSearchBar;
6261

6362
@Plugin(type = Searcher.class, enabled = false)
6463
public class ImageScSearcher implements Searcher {
@@ -129,8 +128,7 @@ private SearchResult createResult(JsonObject post, Map<String, String> topics, M
129128
String title = topics.get(get(post, "topic_id"));
130129
String displayName = get(post, "name");
131130
displayName += displayName.isEmpty() ? get(post, "username") : " (" + get(post, "username") + ")";
132-
String iconPath = get(post, "avatar_template").replace("{size}", "" + SwingSearchBar.ICON_SIZE);
133-
if (!iconPath.startsWith("https://")) iconPath = FORUM_AVATAR_PREFIX + iconPath;
131+
String iconPath = null;
134132
Map<String, String> extraProps = new LinkedHashMap<>();
135133
extraProps.put("Created", formatDate(get(post, "created_at")) + " by " + displayName);
136134
extraProps.put("Tags", tags.get(get(post, "topic_id")));

0 commit comments

Comments
 (0)