Panagiotis Triantafyllou

feedback fixes

......@@ -2,6 +2,7 @@ package warp.ly.android_sdk.activities;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
import org.json.JSONObject;
......@@ -36,7 +37,7 @@ public class SplashActivity extends BaseActivity {
public void onWarplyReady() {
if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) {
WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest()
.setGuid("7000000833"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282
.setGuid("7000023717"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282
mLoginReceiver);
} else {
startNextActivity();
......@@ -102,7 +103,8 @@ public class SplashActivity extends BaseActivity {
@Override
public void onFailure(int errorCode) {
startNextActivity();
// startNextActivity();
Toast.makeText(SplashActivity.this, "LOGIN ERROR", Toast.LENGTH_SHORT).show();
}
};
}
......
......@@ -117,6 +117,7 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe
WarplyAnalyticsManager.logTrackersEvent(this, "click", ("Coupon").concat(":").concat(coupon.getName()));
Intent intent = new Intent(ActiveCouponsActivity.this, CouponInfoActivity.class);
intent.putExtra("coupon", coupon.getCoupon());
intent.putExtra("isFromWallet", true);
startActivity(intent);
}
})
......
......@@ -333,7 +333,8 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
public void onSuccess(JSONObject result) {
int status = result.optInt("status", 2);
String message = result.optString("msg", "");
WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
if (status == 1)
WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
runOnUiThread(() -> {
if (status == 1)
acceptSharingDialog();
......
......@@ -276,7 +276,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
startActivity(intent);
}
})
.setNegativeButton(R.string.cos_dlg_negative_button5, (dialogNegative, whichNegative) -> {
.setNegativeButton(R.string.cos_dlg_negative_button6, (dialogNegative, whichNegative) -> {
dialogNegative.dismiss();
if (success) {
onBackPressed();
......
......@@ -152,8 +152,12 @@ public class NewCampaign implements Parcelable, Serializable {
} else {
this.filter = "";
}
if (this.extraFields.has("coupon_img")) {
this.couponImg = this.extraFields.optString("coupon_img");
} else {
this.couponImg = "";
}
}
this.couponImg = json.optString("coupon_img");
}
public NewCampaign(Parcel source) {
......
......@@ -1594,7 +1594,8 @@ public class WarplyManager {
@Override
public void onFailure(Throwable throwable) {
receiver.onFailure(2);
executorService.shutdownNow();
new Handler(Looper.getMainLooper()).post(() -> receiver.onFailure(2));
}
}, executorService);
}
......@@ -1632,7 +1633,8 @@ public class WarplyManager {
@Override
public void onFailure(Throwable throwable) {
receiver.onFailure(2);
executorService.shutdownNow();
new Handler(Looper.getMainLooper()).post(() -> receiver.onFailure(2));
}
}, executorService);
......
......@@ -98,6 +98,7 @@
<string name="cos_dlg_return_text">Έλαβες πίσω το δώρο σου, κουπόνι αξίας 100€ για τα Intersport</string>
<string name="cos_dlg_negative_button2">Άκυρο</string>
<string name="cos_dlg_negative_button5">Ακύρωση</string>
<string name="cos_dlg_negative_button6">Κλείσιμο</string>
<string name="cos_profile_preferences">Πρόσθεσε τις προτιμήσεις σου</string>
<string name="cos_profile_history">Δες το ιστορικό σου</string>
<string name="cos_shops">Δες τα καταστήματα</string>
......