Panagiotis Triantafyllou

feedback fixes

...@@ -2,6 +2,7 @@ package warp.ly.android_sdk.activities; ...@@ -2,6 +2,7 @@ package warp.ly.android_sdk.activities;
2 2
3 import android.content.Intent; 3 import android.content.Intent;
4 import android.os.Bundle; 4 import android.os.Bundle;
5 +import android.widget.Toast;
5 6
6 import org.json.JSONObject; 7 import org.json.JSONObject;
7 8
...@@ -36,7 +37,7 @@ public class SplashActivity extends BaseActivity { ...@@ -36,7 +37,7 @@ public class SplashActivity extends BaseActivity {
36 public void onWarplyReady() { 37 public void onWarplyReady() {
37 if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) { 38 if (!WarplyDBHelper.getInstance(SplashActivity.this).isTableNotEmpty("auth")) {
38 WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest() 39 WarplyManager.getCosmoteUser(new WarplyCosmoteUserRequest()
39 - .setGuid("7000000833"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282 40 + .setGuid("7000023717"), //6012049321, 6012049322, 6012049323, 7000000831 history, 7000000826, 7000000831 shared coupons, prod 6006552990, prod 6005892749, live 3000184910,prod 7000070282
40 mLoginReceiver); 41 mLoginReceiver);
41 } else { 42 } else {
42 startNextActivity(); 43 startNextActivity();
...@@ -102,7 +103,8 @@ public class SplashActivity extends BaseActivity { ...@@ -102,7 +103,8 @@ public class SplashActivity extends BaseActivity {
102 103
103 @Override 104 @Override
104 public void onFailure(int errorCode) { 105 public void onFailure(int errorCode) {
105 - startNextActivity(); 106 +// startNextActivity();
107 + Toast.makeText(SplashActivity.this, "LOGIN ERROR", Toast.LENGTH_SHORT).show();
106 } 108 }
107 }; 109 };
108 } 110 }
......
...@@ -117,6 +117,7 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe ...@@ -117,6 +117,7 @@ public class ActiveCouponsActivity extends Activity implements View.OnClickListe
117 WarplyAnalyticsManager.logTrackersEvent(this, "click", ("Coupon").concat(":").concat(coupon.getName())); 117 WarplyAnalyticsManager.logTrackersEvent(this, "click", ("Coupon").concat(":").concat(coupon.getName()));
118 Intent intent = new Intent(ActiveCouponsActivity.this, CouponInfoActivity.class); 118 Intent intent = new Intent(ActiveCouponsActivity.this, CouponInfoActivity.class);
119 intent.putExtra("coupon", coupon.getCoupon()); 119 intent.putExtra("coupon", coupon.getCoupon());
120 + intent.putExtra("isFromWallet", true);
120 startActivity(intent); 121 startActivity(intent);
121 } 122 }
122 }) 123 })
......
...@@ -333,6 +333,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene ...@@ -333,6 +333,7 @@ public class CouponShareActivity extends Activity implements View.OnClickListene
333 public void onSuccess(JSONObject result) { 333 public void onSuccess(JSONObject result) {
334 int status = result.optInt("status", 2); 334 int status = result.optInt("status", 2);
335 String message = result.optString("msg", ""); 335 String message = result.optString("msg", "");
336 + if (status == 1)
336 WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver); 337 WarplyManager.getUserCouponsWithCouponsets(mUserCouponsReceiver);
337 runOnUiThread(() -> { 338 runOnUiThread(() -> {
338 if (status == 1) 339 if (status == 1)
......
...@@ -276,7 +276,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe ...@@ -276,7 +276,7 @@ public class CouponsetInfoActivity extends Activity implements View.OnClickListe
276 startActivity(intent); 276 startActivity(intent);
277 } 277 }
278 }) 278 })
279 - .setNegativeButton(R.string.cos_dlg_negative_button5, (dialogNegative, whichNegative) -> { 279 + .setNegativeButton(R.string.cos_dlg_negative_button6, (dialogNegative, whichNegative) -> {
280 dialogNegative.dismiss(); 280 dialogNegative.dismiss();
281 if (success) { 281 if (success) {
282 onBackPressed(); 282 onBackPressed();
......
...@@ -152,8 +152,12 @@ public class NewCampaign implements Parcelable, Serializable { ...@@ -152,8 +152,12 @@ public class NewCampaign implements Parcelable, Serializable {
152 } else { 152 } else {
153 this.filter = ""; 153 this.filter = "";
154 } 154 }
155 + if (this.extraFields.has("coupon_img")) {
156 + this.couponImg = this.extraFields.optString("coupon_img");
157 + } else {
158 + this.couponImg = "";
159 + }
155 } 160 }
156 - this.couponImg = json.optString("coupon_img");
157 } 161 }
158 162
159 public NewCampaign(Parcel source) { 163 public NewCampaign(Parcel source) {
......
...@@ -1594,7 +1594,8 @@ public class WarplyManager { ...@@ -1594,7 +1594,8 @@ public class WarplyManager {
1594 1594
1595 @Override 1595 @Override
1596 public void onFailure(Throwable throwable) { 1596 public void onFailure(Throwable throwable) {
1597 - receiver.onFailure(2); 1597 + executorService.shutdownNow();
1598 + new Handler(Looper.getMainLooper()).post(() -> receiver.onFailure(2));
1598 } 1599 }
1599 }, executorService); 1600 }, executorService);
1600 } 1601 }
...@@ -1632,7 +1633,8 @@ public class WarplyManager { ...@@ -1632,7 +1633,8 @@ public class WarplyManager {
1632 1633
1633 @Override 1634 @Override
1634 public void onFailure(Throwable throwable) { 1635 public void onFailure(Throwable throwable) {
1635 - receiver.onFailure(2); 1636 + executorService.shutdownNow();
1637 + new Handler(Looper.getMainLooper()).post(() -> receiver.onFailure(2));
1636 } 1638 }
1637 }, executorService); 1639 }, executorService);
1638 1640
......
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
98 <string name="cos_dlg_return_text">Έλαβες πίσω το δώρο σου, κουπόνι αξίας 100€ για τα Intersport</string> 98 <string name="cos_dlg_return_text">Έλαβες πίσω το δώρο σου, κουπόνι αξίας 100€ για τα Intersport</string>
99 <string name="cos_dlg_negative_button2">Άκυρο</string> 99 <string name="cos_dlg_negative_button2">Άκυρο</string>
100 <string name="cos_dlg_negative_button5">Ακύρωση</string> 100 <string name="cos_dlg_negative_button5">Ακύρωση</string>
101 + <string name="cos_dlg_negative_button6">Κλείσιμο</string>
101 <string name="cos_profile_preferences">Πρόσθεσε τις προτιμήσεις σου</string> 102 <string name="cos_profile_preferences">Πρόσθεσε τις προτιμήσεις σου</string>
102 <string name="cos_profile_history">Δες το ιστορικό σου</string> 103 <string name="cos_profile_history">Δες το ιστορικό σου</string>
103 <string name="cos_shops">Δες τα καταστήματα</string> 104 <string name="cos_shops">Δες τα καταστήματα</string>
......