Editable removeTrader

This commit is contained in:
Nicolás Sánchez 2025-05-16 17:14:01 -03:00
parent 76d9b739f6
commit 49a84016d9
1 changed files with 9 additions and 2 deletions

View File

@ -889,11 +889,18 @@ public class WorkerInterface {
public static void sendRemoveTraderCall(String exchange, String pair, Context context) {
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle("Remove "+ pair + " from instance?");
builder.setTitle("Remove trader from instance?");
final EditText input = new EditText(context);
input.setInputType(InputType.TYPE_CLASS_TEXT);
input.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
input.setText(pair);
builder.setView(input);
builder.setPositiveButton("Remove trader", (dialog, which) -> {
final String pairToRemove = input.getText().toString();
new Thread(() -> {
try {
JsonObject response = WorkerInterface.removeTrader(exchange, pair, true);
JsonObject response = WorkerInterface.removeTrader(exchange, pairToRemove, true);
new Handler(Looper.getMainLooper()).post(() -> {
showToggleDialog(response, context);
});