Fix issue #119
This commit is contained in:
parent
ccb5cd20b1
commit
efd6b0088f
|
@ -68,7 +68,7 @@ public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<Recyc
|
|||
ViewHolder holder = (ViewHolder) viewHolder;
|
||||
Notification notification = notifications.get(position);
|
||||
//Follow Notification
|
||||
|
||||
boolean clickableNotification = true;
|
||||
holder.peertube_notif_pp.setVisibility(View.VISIBLE);
|
||||
AccountData.Account accountAction = null;
|
||||
ChannelData.Channel channelAction = null;
|
||||
|
@ -158,11 +158,13 @@ public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<Recyc
|
|||
});
|
||||
} else if (notification.getVideoAbuse() != null && notification.getVideoAbuse().getVideo() != null) {
|
||||
message = context.getString(R.string.peertube_video_abuse, notification.getVideoAbuse().getVideo().getName());
|
||||
clickableNotification = false;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
holder.peertube_notif_message.setText(Html.fromHtml(message, Html.FROM_HTML_MODE_LEGACY));
|
||||
else
|
||||
holder.peertube_notif_message.setText(Html.fromHtml(message));
|
||||
} else if (notification.getAbuse() != null) {
|
||||
clickableNotification = false;
|
||||
if (notification.getType() == DisplayNotificationsFragment.MY_VIDEO_REPPORT_SUCCESS) {
|
||||
message = context.getString(R.string.peertube_video_report_success, notification.getAbuse().getId());
|
||||
}
|
||||
|
@ -175,6 +177,7 @@ public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<Recyc
|
|||
holder.peertube_notif_date.setText(Helper.dateDiff(context, notification.getCreatedAt()));
|
||||
AccountData.Account finalAccountAction = accountAction;
|
||||
ChannelData.Channel finalChannelAction = channelAction;
|
||||
if (clickableNotification) {
|
||||
holder.peertube_notif_pp.setOnClickListener(v -> {
|
||||
Bundle b = new Bundle();
|
||||
Intent intent = null;
|
||||
|
@ -192,6 +195,7 @@ public class PeertubeNotificationsListAdapter extends RecyclerView.Adapter<Recyc
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue