Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-09-09 13:17:56 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
93bf14c53742ff196e0c2eff09c7d47523771e5f
93bf14c5
1 parent
b1a3e791
fix coupons_fetched event
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
View file @
93bf14c
...
...
@@ -176,6 +176,8 @@ var timer2: DispatchSourceTimer?
if
(
couponsData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
SwiftEventBus
.
post
(
"coupons_fetched"
)
print
(
"========= getCouponsRequest SUCCESSSS CampaignVC ========="
)
print
(
"========= getCouponsRequest count CampaignVC ========="
)
...
...
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
View file @
93bf14c
...
...
@@ -6,7 +6,7 @@
//
import
UIKit
//
import SwiftEventBus
import
SwiftEventBus
@objc
public
class
CouponViewController
:
UIViewController
{
@IBOutlet
weak
var
mainView
:
UIView
!
...
...
@@ -144,6 +144,7 @@ import UIKit
if
(
couponsData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
SwiftEventBus
.
post
(
"coupons_fetched"
)
}
}
else
{
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/CouponsViewController.swift
View file @
93bf14c
...
...
@@ -57,6 +57,7 @@ import SwiftEventBus
self
.
coupons
=
activeCouponData
DispatchQueue
.
main
.
async
{
SwiftEventBus
.
post
(
"coupons_fetched"
)
self
.
tableView
.
reloadData
()
}
}
else
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/ShareViewController.swift
View file @
93bf14c
...
...
@@ -6,6 +6,7 @@
//
import
UIKit
import
SwiftEventBus
@objc
public
class
ShareViewController
:
UIViewController
,
UITextFieldDelegate
,
UIPopoverControllerDelegate
{
@IBOutlet
weak
var
mainView
:
UIView
!
...
...
@@ -220,6 +221,7 @@ import UIKit
if
(
couponsData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
SwiftEventBus
.
post
(
"coupons_fetched"
)
self
.
showSuccessDialog
(
"Συγχαρητήρια!"
,
"Μόλις έκανες δώρο ένα κουπόνι!"
)
}
}
else
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
93bf14c
...
...
@@ -619,7 +619,7 @@ public class swiftApi {
swiftApi
()
.
setCouponList
(
tempCoupons
)
swiftApi
()
.
setOldCouponList
(
tempCoupons
)
SwiftEventBus
.
post
(
"coupons_fetched"
)
//
SwiftEventBus.post("coupons_fetched")
let
activeCoupons
=
tempCoupons
.
filter
({
return
$0
.
status
==
1
})
getCouponsCallback
(
activeCoupons
)
...
...
@@ -2968,6 +2968,7 @@ public class swiftApi {
func
getCouponsCallback
(
_
couponsData
:
Array
<
swiftApi
.
CouponItemModel
>
?)
->
Void
{
if
(
couponsData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
SwiftEventBus
.
post
(
"coupons_fetched"
)
}
}
else
{
}
...
...
Please
register
or
login
to post a comment