diff --git a/app/src/main/java/eu/faircode/email/AdapterAnswer.java b/app/src/main/java/eu/faircode/email/AdapterAnswer.java index aba71f517e..580fbd46a1 100644 --- a/app/src/main/java/eu/faircode/email/AdapterAnswer.java +++ b/app/src/main/java/eu/faircode/email/AdapterAnswer.java @@ -135,9 +135,11 @@ public class AdapterAnswer extends RecyclerView.Adapter() { + @Override + protected Boolean onExecute(Context context, Bundle args) { + long id = args.getLong("id"); + boolean favorite = args.getBoolean("favorite"); + + DB db = DB.getInstance(context); + db.answer().setAnswerFavorite(id, favorite); + + return favorite; + } + + @Override + protected void onException(Bundle args, Throwable ex) { + Log.unexpectedError(parentFragment.getParentFragmentManager(), ex); + } + }.execute(context, owner, args, "answer:favorite"); + } + private void onActionHide(boolean hide) { Bundle args = new Bundle(); args.putLong("id", answer.id); @@ -183,7 +212,7 @@ public class AdapterAnswer extends RecyclerView.Adapter