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
2024-04-10 19:12:26 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6a6d747956750dce223278e73279128af53e5c86
6a6d7479
1 parent
7983224b
fix ContextualVC success modal action
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/ContextualViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/ContextualViewController.swift
View file @
6a6d747
...
...
@@ -194,6 +194,47 @@ import SwiftEventBus
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
}
func
showSuccessDialog
(
_
alertTitle
:
String
,
_
alertSubTitle
:
String
)
->
Void
{
let
alert
=
UIAlertController
(
title
:
alertTitle
,
message
:
alertSubTitle
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
{
action
in
switch
action
.
style
{
case
.
default
:
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
swiftApi
()
.
getCouponsAsync
(
getCouponsCallback
,
failureCallback
:
{
errorCode
in
})
func
getCouponsCallback
(
_
couponsData
:
Array
<
swiftApi
.
CouponItemModel
>
?)
->
Void
{
if
(
couponsData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
SwiftEventBus
.
post
(
"coupons_fetched"
)
}
}
else
{
}
}
swiftApi
()
.
getCampaignsAsyncNew
(
language
:
"en"
,
filters
:
[
String
:
Any
](),
getCampaignsCallback
,
failureCallback
:
{
errorCode
in
})
func
getCampaignsCallback
(
_
campaignsData
:
Array
<
swiftApi
.
CampaignItemModel
>
?)
->
Void
{
if
(
campaignsData
!=
nil
)
{
DispatchQueue
.
main
.
async
{
SwiftEventBus
.
post
(
"campaigns_retrieved"
)
}
}
else
{
}
}
case
.
cancel
:
print
(
"cancel"
)
case
.
destructive
:
print
(
"destructive"
)
}
}))
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
}
// MARK: - API CALLS
func
getProfileRequest
()
{
...
...
@@ -240,7 +281,7 @@ import SwiftEventBus
ccmsEnabled
.
_isActivated
=
true
SwiftEventBus
.
post
(
"ccms_enabled"
,
sender
:
ccmsEnabled
)
self
.
showDialog
(
"Το αίτημά σου ολοκληρώθηκε επιτυχώς!"
,
"Θα ενημερωθείς άμεσα για την ενεργοποίηση του πακέτου σου."
)
self
.
show
Success
Dialog
(
"Το αίτημά σου ολοκληρώθηκε επιτυχώς!"
,
"Θα ενημερωθείς άμεσα για την ενεργοποίηση του πακέτου σου."
)
// self.postEventRequest()
}
else
{
...
...
Please
register
or
login
to post a comment