From 4f8945cbe349638550a377e4369666df9888f87f Mon Sep 17 00:00:00 2001 From: stom79 Date: Mon, 25 Dec 2017 10:18:47 +0100 Subject: [PATCH] Change button behavior for spoiler in notifications --- .../mastodon/drawers/NotificationsListAdapter.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java index 776b04872..f6bd02470 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java @@ -483,9 +483,8 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On public void onClick(View v) { loadAttachments(status, holder); holder.status_show_more.setVisibility(View.GONE); - status.setAttachmentShown(true); - notificationsListAdapter.notifyDataSetChanged(); - + notification.getStatus().setAttachmentShown(true); + notifyNotificationChanged(notification); /* Added a Countdown Timer, so that Sensitive (NSFW) images only get displayed for user set time, @@ -503,10 +502,10 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On } public void onFinish() { - status.setAttachmentShown(false); + notification.getStatus().setAttachmentShown(false); holder.status_show_more.setVisibility(View.VISIBLE); - notificationsListAdapter.notifyDataSetChanged(); + notifyNotificationChanged(notification); } }.start(); }