Showing
2 changed files
with
13 additions
and
0 deletions
No preview for this file type
... | @@ -556,6 +556,8 @@ public class swiftApi { | ... | @@ -556,6 +556,8 @@ public class swiftApi { |
556 | swiftApi().setCouponList(tempCoupons) | 556 | swiftApi().setCouponList(tempCoupons) |
557 | swiftApi().setOldCouponList(tempCoupons) | 557 | swiftApi().setOldCouponList(tempCoupons) |
558 | 558 | ||
559 | + SwiftEventBus.post("coupons_fetched") | ||
560 | + | ||
559 | let activeCoupons = tempCoupons.filter({ return $0.status == 1 }) | 561 | let activeCoupons = tempCoupons.filter({ return $0.status == 1 }) |
560 | getCouponsCallback(activeCoupons) | 562 | getCouponsCallback(activeCoupons) |
561 | } | 563 | } |
... | @@ -2897,6 +2899,17 @@ public class swiftApi { | ... | @@ -2897,6 +2899,17 @@ public class swiftApi { |
2897 | 2899 | ||
2898 | if (sharingData?.getStatus == 1) { | 2900 | if (sharingData?.getStatus == 1) { |
2899 | self.acceptSharingDialog(controller) | 2901 | self.acceptSharingDialog(controller) |
2902 | + | ||
2903 | + swiftApi().getCouponsAsync(getCouponsCallback) | ||
2904 | + | ||
2905 | + func getCouponsCallback (_ couponsData: Array<swiftApi.CouponItemModel>?) -> Void { | ||
2906 | + if (couponsData != nil) { | ||
2907 | + DispatchQueue.main.async { | ||
2908 | + } | ||
2909 | + } else { | ||
2910 | + } | ||
2911 | + } | ||
2912 | + | ||
2900 | } else { | 2913 | } else { |
2901 | self.errorSharingDialog(controller) | 2914 | self.errorSharingDialog(controller) |
2902 | } | 2915 | } | ... | ... |
-
Please register or login to post a comment