Skip to content

Commit

Permalink
Remove /80 from faviconkit api
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHalvdansson committed Oct 4, 2023
1 parent 9b2f0ef commit 900083e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void onClick(View view) {
if (showThumbnail && !TextUtils.isEmpty(story.url)) {
try {
Picasso.get()
.load("https://api.faviconkit.com/" + Utils.getDomainName(story.url) + "/80")
.load("https://api.faviconkit.com/" + Utils.getDomainName(story.url) + "")
.resize(80, 80)
.onlyScaleDown()
.placeholder(Objects.requireNonNull(ContextCompat.getDrawable(ctx, R.drawable.ic_action_web)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.sufficientlysecure.htmltextview.OnClickATagListener;

import java.lang.reflect.Array;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -181,13 +182,14 @@ public void onBindViewHolder(@NotNull final RecyclerView.ViewHolder holder, int
//Picasso sometimes loses its context, that should just be ignored
try {
Picasso.get()
.load("https://api.faviconkit.com/" + url + "/80")
//.load("https://www.google.com/s2/favicons?domain="+ url + "&sz=80")
.load("https://api.faviconkit.com/" + url + "")
//.load("https://icons.duckduckgo.com/ip3/" + url + ".ico")
.resize(80, 80)
.onlyScaleDown()
.placeholder(Objects.requireNonNull(ContextCompat.getDrawable(ctx, R.drawable.ic_action_web)))
.into(storyViewHolder.metaFavicon);
} catch (Exception ignored){};

}

storyViewHolder.commentsIcon.setImageResource(hotness > 0 && storyViewHolder.story.score + storyViewHolder.story.descendants > hotness ? R.drawable.ic_action_whatshot : R.drawable.ic_action_comment);
Expand Down

0 comments on commit 900083e

Please sign in to comment.