get requests on Earn
This commit is contained in:
parent
2e4b0ec0a6
commit
958ed62b45
|
|
@ -86,7 +86,9 @@ public class EarnerInterface {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
JsonObject result = getLastSubscription(exchange, true);
|
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) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
new Handler(Looper.getMainLooper()).post(() -> Toast.makeText(context, "Failed to get last subscription", Toast.LENGTH_SHORT).show());
|
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(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
JsonObject result = getLastRedemption(exchange, true);
|
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) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
new Handler(Looper.getMainLooper()).post(() -> Toast.makeText(context, "Failed to get last redemption", Toast.LENGTH_SHORT).show());
|
new Handler(Looper.getMainLooper()).post(() -> Toast.makeText(context, "Failed to get last redemption", Toast.LENGTH_SHORT).show());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue