Skip to content

Commit

Permalink
when editting it is useful to know the source URL
Browse files Browse the repository at this point in the history
this includes that in the payload if different
  • Loading branch information
ahgittin committed Nov 16, 2018
1 parent d0897b2 commit 44b6e54
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.net.URI;
import java.util.Collections;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;

Expand Down Expand Up @@ -87,7 +88,11 @@ private static <T extends TypeSummary> T embellish(T result, RegisteredType item
result.setExtraField("template", true);
}
if (item.getIconUrl()!=null) {
result.setIconUrl(tidyIconLink(b, item, item.getIconUrl(), ub));
String tidiedUrl = tidyIconLink(b, item, item.getIconUrl(), ub);
result.setIconUrl(tidiedUrl);
if (!Objects.equals(item.getIconUrl(), tidiedUrl)) {
result.setExtraField("iconUrlSource", item.getIconUrl());
}
}

if (detail) {
Expand Down

0 comments on commit 44b6e54

Please sign in to comment.