From 098e2d87ec1270db6defc9537ec035cb0aaf91cd Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 12 Jan 2023 09:54:43 +0100 Subject: [PATCH] Some fixes --- .../app/fedilab/android/helper/PinnedTimelineHelper.java | 2 +- .../app/fedilab/android/ui/drawer/StatusAdapter.java | 2 +- .../fastlane/metadata/android/en/changelogs/464.txt | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 src/fdroid/fastlane/metadata/android/en/changelogs/464.txt diff --git a/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java b/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java index 7a39946d..4f92c1e8 100644 --- a/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/PinnedTimelineHelper.java @@ -464,7 +464,7 @@ public class PinnedTimelineHelper { break; case NITTER: item.setIcon(R.drawable.nitter); - if (pinnedTimeline.remoteInstance.displayName.trim().length() > 0) { + if (pinnedTimeline.remoteInstance.displayName != null && pinnedTimeline.remoteInstance.displayName.trim().length() > 0) { item.setTitle(pinnedTimeline.remoteInstance.displayName); } else { item.setTitle(pinnedTimeline.remoteInstance.host); diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java index baa1a162..24d837d5 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java @@ -2615,7 +2615,7 @@ public class StatusAdapter extends RecyclerView.Adapter holder.bindingArt.artMedia.setScaleType(ImageView.ScaleType.FIT_CENTER); holder.bindingArt.artMedia.setLayoutParams(lp); RequestBuilder requestBuilder = prepareRequestBuilder(context, status.art_attachment, mediaW * ratio, mediaH * ratio, 1.0f, 1.0f, status.sensitive, true); - requestBuilder.into(holder.bindingArt.artMedia); + requestBuilder.load(status.art_attachment.preview_url).into(holder.bindingArt.artMedia); } } diff --git a/src/fdroid/fastlane/metadata/android/en/changelogs/464.txt b/src/fdroid/fastlane/metadata/android/en/changelogs/464.txt new file mode 100644 index 00000000..e53c4869 --- /dev/null +++ b/src/fdroid/fastlane/metadata/android/en/changelogs/464.txt @@ -0,0 +1,9 @@ +Added: + + +Changed: + + +Fixed: +- Fix a crash with Art timelines +- Fix a crash with pinned timelines \ No newline at end of file