Fix issue #379 - Media displayed several times in notifications

This commit is contained in:
Thomas 2022-10-29 10:48:49 +02:00
parent c592f1cc01
commit 5458d93bcf

View file

@ -279,7 +279,7 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
holderStatus.bindingNotification.containerTransparent.setVisibility(View.VISIBLE); holderStatus.bindingNotification.containerTransparent.setVisibility(View.VISIBLE);
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
boolean displayMedia = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_MEDIA_NOTIFICATION), true); boolean displayMedia = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_MEDIA_NOTIFICATION), true);
if (displayMedia) { if (displayMedia && notification.status.media_attachments != null && notification.status.media_attachments.size() > 0) {
holderStatus.bindingNotification.status.mediaContainer.setVisibility(View.VISIBLE); holderStatus.bindingNotification.status.mediaContainer.setVisibility(View.VISIBLE);
} else { } else {
holderStatus.bindingNotification.status.mediaContainer.setVisibility(View.GONE); holderStatus.bindingNotification.status.mediaContainer.setVisibility(View.GONE);