diff options
-rw-r--r-- | app/build.gradle | 4 | ||||
-rw-r--r-- | app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/app/build.gradle b/app/build.gradle index 0a2315655..66f6b632c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { defaultConfig { minSdk 21 targetSdk 31 - versionCode 394 - versionName "3.0.3" + versionCode 395 + versionName "3.0.5" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } flavorDimensions "default" diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java index 4e3e9f20f..35ac4ad8f 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java @@ -455,8 +455,12 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder List<Attachment> attachmentList = statusList.get(position).media_attachments; if (attachmentList != null && attachmentList.size() > 0) { holder.binding.sensitiveMedia.setVisibility(View.VISIBLE); - holder.binding.sensitiveMedia.setChecked(currentAccount.mastodon_account.source.sensitive); - statusList.get(position).sensitive = currentAccount.mastodon_account.source.sensitive; + if (currentAccount.mastodon_account.source != null) { + holder.binding.sensitiveMedia.setChecked(currentAccount.mastodon_account.source.sensitive); + statusList.get(position).sensitive = currentAccount.mastodon_account.source.sensitive; + } else { + statusList.get(position).sensitive = false; + } holder.binding.sensitiveMedia.setOnCheckedChangeListener((buttonView, isChecked) -> statusList.get(position).sensitive = isChecked); int mediaPosition = 0; for (Attachment attachment : attachmentList) { |