Fix index status in notifications
This commit is contained in:
parent
fb38a0f32d
commit
b9585941f4
|
@ -7,6 +7,7 @@ import java.util.List;
|
|||
|
||||
import app.fedilab.android.activities.OwnerNotificationChartsActivity;
|
||||
import app.fedilab.android.client.Entities.Notification;
|
||||
import app.fedilab.android.client.Entities.Status;
|
||||
|
||||
/* Copyright 2020 Thomas Schneider
|
||||
*
|
||||
|
@ -28,7 +29,7 @@ public class NotificationsListAdapter extends BaseNotificationsListAdapter{
|
|||
super(isOnWifi, behaviorWithAttachments, notifications);
|
||||
}
|
||||
|
||||
public void notificationStatusChart(){
|
||||
public void notificationStatusChart(Status status){
|
||||
Intent intent = new Intent(context, OwnerNotificationChartsActivity.class);
|
||||
Bundle b = new Bundle();
|
||||
b.putString("status_id", status.getReblog() != null ? status.getReblog().getId() : status.getId());
|
||||
|
|
|
@ -128,7 +128,6 @@ public abstract class BaseNotificationsListAdapter extends RecyclerView.Adapter<
|
|||
|
||||
private final Object lock = new Object();
|
||||
protected Context context;
|
||||
protected Status status;
|
||||
private List<Notification> notifications;
|
||||
private BaseNotificationsListAdapter notificationsListAdapter;
|
||||
private int behaviorWithAttachments;
|
||||
|
@ -371,7 +370,7 @@ public abstract class BaseNotificationsListAdapter extends RecyclerView.Adapter<
|
|||
holder.spark_button_reblog.setImageSize((int) (20 * iconSizePercent / 100 * scale + 0.5f));
|
||||
holder.spark_button_reblog.setMinimumWidth((int) Helper.convertDpToPixel(((float) (20 * iconSizePercent) / 100 * scale + 0.5f), context));
|
||||
|
||||
status = notification.getStatus();
|
||||
final Status status = notification.getStatus();
|
||||
if (status != null) {
|
||||
if (status.getMedia_attachments() == null || status.getMedia_attachments().size() < 1)
|
||||
holder.status_document_container.setVisibility(View.GONE);
|
||||
|
@ -872,8 +871,7 @@ public abstract class BaseNotificationsListAdapter extends RecyclerView.Adapter<
|
|||
context.startActivity(intent);
|
||||
return true;
|
||||
case R.id.action_stats:
|
||||
notificationStatusChart();
|
||||
|
||||
notificationStatusChart(status);
|
||||
return true;
|
||||
case R.id.action_info:
|
||||
intent = new Intent(context, TootInfoActivity.class);
|
||||
|
@ -1290,7 +1288,7 @@ public abstract class BaseNotificationsListAdapter extends RecyclerView.Adapter<
|
|||
}
|
||||
}
|
||||
|
||||
protected abstract void notificationStatusChart();
|
||||
protected abstract void notificationStatusChart(Status status);
|
||||
|
||||
class ViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
|
|
Loading…
Reference in New Issue