fix codacy issues

This commit is contained in:
AndyScherzinger 2018-07-19 14:16:04 +02:00
parent 3bea212814
commit d19e209ab6
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -121,9 +121,11 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
// add action buttons
holder.buttons.removeAllViews();
Button button;
ExecuteActionTask executeActionTask = new ExecuteActionTask(holder);
for (Action action : notification.getActions()) {
Button button = new Button(notificationsActivity);
button = new Button(notificationsActivity);
button.setText(action.label);
if (action.primary) {
button.getBackground().setColorFilter(ThemeUtils.primaryColor(notificationsActivity, true),
@ -131,7 +133,7 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
button.setTextColor(ThemeUtils.fontColor(notificationsActivity));
}
button.setOnClickListener(v -> new ExecuteActionTask(holder).execute(action));
button.setOnClickListener(v -> executeActionTask.execute(action));
holder.buttons.addView(button);
}