Skip to content

Commit

Permalink
work with a single task object
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
  • Loading branch information
AndyScherzinger committed Feb 13, 2019
1 parent 6ca671a commit 941239c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void onBindViewHolder(@NonNull NotificationViewHolder holder, int positio
MaterialButton button;

Resources resources = notificationsActivity.getResources();

NotificationExecuteActionTask task = new NotificationExecuteActionTask(client, holder, notificationsActivity);

for (Action action : notification.getActions()) {
button = new MaterialButton(notificationsActivity);
Expand Down Expand Up @@ -167,8 +167,7 @@ public void onBindViewHolder(@NonNull NotificationViewHolder holder, int positio

button.setOnClickListener(v -> {
setButtonEnabled(holder, false);

new NotificationExecuteActionTask(client, holder, notificationsActivity).execute(action);
task.execute(action);
});

holder.buttons.addView(button);
Expand Down

0 comments on commit 941239c

Please sign in to comment.