From 56caeef72b75172d9f6d2904a1e9a99219a4b7d5 Mon Sep 17 00:00:00 2001 From: Javi Rueda Date: Tue, 10 Aug 2021 18:28:20 +0200 Subject: [PATCH] Use the new CDN url scheme for thumbnails --- .../java/io/lbry/browser/MainActivity.java | 2 +- .../adapter/ChannelFilterListAdapter.java | 2 +- .../browser/adapter/ClaimListAdapter.java | 3 +- .../browser/adapter/CommentListAdapter.java | 2 +- .../adapter/NotificationListAdapter.java | 2 +- .../adapter/SuggestedChannelGridAdapter.java | 3 +- .../java/io/lbry/browser/model/Claim.java | 41 +++++++++++++++++++ .../ui/channel/ChannelCommentsFragment.java | 2 +- .../ui/channel/ChannelFormFragment.java | 2 +- .../browser/ui/channel/ChannelFragment.java | 6 ++- .../ui/findcontent/FileViewFragment.java | 7 ++-- .../ui/publish/PublishFormFragment.java | 4 +- 12 files changed, 63 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index 1c11f762..5bee4b9b 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -2102,7 +2102,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener if (nowPlayingClaimBitmap == null && nowPlayingClaim != null && !Helper.isNullOrEmpty(nowPlayingClaim.getThumbnailUrl())) { - Glide.with(getApplicationContext()).asBitmap().load(nowPlayingClaim.getThumbnailUrl()).into(new CustomTarget() { + Glide.with(getApplicationContext()).asBitmap().load(nowPlayingClaim.getThumbnailUrl(0, 0, 75)).into(new CustomTarget() { @Override public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition transition) { nowPlayingClaimBitmap = resource; diff --git a/app/src/main/java/io/lbry/browser/adapter/ChannelFilterListAdapter.java b/app/src/main/java/io/lbry/browser/adapter/ChannelFilterListAdapter.java index 0f38a3b7..34105e56 100644 --- a/app/src/main/java/io/lbry/browser/adapter/ChannelFilterListAdapter.java +++ b/app/src/main/java/io/lbry/browser/adapter/ChannelFilterListAdapter.java @@ -95,7 +95,7 @@ public class ChannelFilterListAdapter extends RecyclerView.Adapter 0) ? streamMetadata.getReleaseTime() * 1000 : item.getTimestamp() * 1000; int bgColor = Helper.generateRandomColorForValue(item.getClaimId()); if (bgColor == 0) { diff --git a/app/src/main/java/io/lbry/browser/adapter/CommentListAdapter.java b/app/src/main/java/io/lbry/browser/adapter/CommentListAdapter.java index b3095d58..5f175c3c 100644 --- a/app/src/main/java/io/lbry/browser/adapter/CommentListAdapter.java +++ b/app/src/main/java/io/lbry/browser/adapter/CommentListAdapter.java @@ -190,7 +190,7 @@ public class CommentListAdapter extends RecyclerView.Adapter