Manos Chorianopoulos

refresh coupons after accepting coupon from dl

......@@ -556,6 +556,8 @@ public class swiftApi {
swiftApi().setCouponList(tempCoupons)
swiftApi().setOldCouponList(tempCoupons)
SwiftEventBus.post("coupons_fetched")
let activeCoupons = tempCoupons.filter({ return $0.status == 1 })
getCouponsCallback(activeCoupons)
}
......@@ -2897,6 +2899,17 @@ public class swiftApi {
if (sharingData?.getStatus == 1) {
self.acceptSharingDialog(controller)
swiftApi().getCouponsAsync(getCouponsCallback)
func getCouponsCallback (_ couponsData: Array<swiftApi.CouponItemModel>?) -> Void {
if (couponsData != nil) {
DispatchQueue.main.async {
}
} else {
}
}
} else {
self.errorSharingDialog(controller)
}
......