diff --git a/app/src/main/java/com/example/dcav2gui/EarnerInterface.java b/app/src/main/java/com/example/dcav2gui/EarnerInterface.java index 1ec80e9..9770905 100644 --- a/app/src/main/java/com/example/dcav2gui/EarnerInterface.java +++ b/app/src/main/java/com/example/dcav2gui/EarnerInterface.java @@ -86,7 +86,9 @@ public class EarnerInterface { new Thread(() -> { try { JsonObject result = getLastSubscription(exchange, true); - new Handler(Looper.getMainLooper()).post(() -> showJsonDialog(result, context)); + String dialogTitle = "Last subscription"; + String dialogMessage = result.get("last_subscription").toString(); + new Handler(Looper.getMainLooper()).post(() -> showSimpleDialog(dialogTitle, dialogMessage, context)); } catch (IOException e) { e.printStackTrace(); new Handler(Looper.getMainLooper()).post(() -> Toast.makeText(context, "Failed to get last subscription", Toast.LENGTH_SHORT).show()); @@ -98,7 +100,9 @@ public class EarnerInterface { new Thread(() -> { try { JsonObject result = getLastRedemption(exchange, true); - new Handler(Looper.getMainLooper()).post(() -> showJsonDialog(result, context)); + String dialogTitle = "Last redemption"; + String dialogMessage = result.get("last_redemption").toString(); + new Handler(Looper.getMainLooper()).post(() -> showSimpleDialog(dialogTitle, dialogMessage, context)); } catch (IOException e) { e.printStackTrace(); new Handler(Looper.getMainLooper()).post(() -> Toast.makeText(context, "Failed to get last redemption", Toast.LENGTH_SHORT).show());