mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
task needs to be a new object for every button
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
de269b2603
commit
4b073e9283
1 changed files with 5 additions and 5 deletions
|
@ -152,10 +152,6 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
|
|||
MaterialButton button;
|
||||
|
||||
Resources resources = notificationsActivity.getResources();
|
||||
NotificationExecuteActionTask task = new NotificationExecuteActionTask(client,
|
||||
holder,
|
||||
notification,
|
||||
notificationsActivity);
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
params.setMargins(20, 0, 20, 0);
|
||||
|
@ -188,7 +184,11 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
|
|||
|
||||
button.setOnClickListener(v -> {
|
||||
setButtonEnabled(holder, false);
|
||||
task.execute(action);
|
||||
new NotificationExecuteActionTask(client,
|
||||
holder,
|
||||
notification,
|
||||
notificationsActivity)
|
||||
.execute(action);
|
||||
});
|
||||
|
||||
holder.buttons.addView(button);
|
||||
|
|
Loading…
Reference in a new issue