diff --git a/app/src/main/java/eu/faircode/email/AdapterAccount.java b/app/src/main/java/eu/faircode/email/AdapterAccount.java index 23427469c1..a30d805dde 100644 --- a/app/src/main/java/eu/faircode/email/AdapterAccount.java +++ b/app/src/main/java/eu/faircode/email/AdapterAccount.java @@ -43,6 +43,7 @@ import android.widget.Button; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; +import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.widget.PopupMenu; @@ -75,6 +76,7 @@ public class AdapterAccount extends RecyclerView.Adapter items = new ArrayList<>(); @@ -93,6 +95,7 @@ public class AdapterAccount extends RecyclerView.Adapter() { + @Override + protected void onPostExecute(Bundle args) { + ToastEx.makeText(context, R.string.title_completed, Toast.LENGTH_LONG).show(); + } + + @Override + protected Void onExecute(Context context, Bundle args) throws Throwable { + long id = args.getLong("id"); + + DB db = DB.getInstance(context); + db.account().resetCreated(id); + + return null; + } + + @Override + protected void onException(Bundle args, Throwable ex) { + Log.unexpectedError(parentFragment.getParentFragmentManager(), ex); + } + }.execute(context, owner, args, "account:reset"); + } }); popupMenu.show(); @@ -454,6 +494,7 @@ public class AdapterAccount extends RecyclerView.Adapter + + + app:layout_constraintTop_toBottomOf="@id/tvCreated" /> Delete this identity permanently? Edit as HTML Sign key: %1$s + Created: %1$s Last connected: %1$s Waiting after failure until: %1$s Server storage usage: %1$s/%2$s