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
2023-06-21 14:36:59 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9c4b103f35b795a372378bcf9931ef4d1a508f3d
9c4b103f
1 parent
52c54f3f
fix supermarket coupon sharing popup text
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
9c4b103
...
...
@@ -3392,7 +3392,8 @@ public class swiftApi {
DispatchQueue
.
main
.
async
{
if
(
sharingData
?
.
_status_outer
==
1
)
{
if
(
sharingData
?
.
_status
!=
nil
&&
sharingData
?
.
_status
!=
""
&&
sharingData
?
.
_status
==
"pending"
)
{
self
.
initialSharingDialog
(
controller
,
"Συγχαρητήρια!"
,
sharingData
?
.
_modal_text
??
""
,
sharingId
)
let
couponsetType
=
sharingData
?
.
_couponset_type
??
""
self
.
initialSharingDialog
(
controller
,
"Συγχαρητήρια!"
,
sharingData
?
.
_modal_text
??
""
,
sharingId
,
couponsetType
)
}
else
if
(
sharingData
?
.
_status
!=
nil
&&
sharingData
?
.
_status
!=
""
&&
sharingData
?
.
_status
==
"reject"
)
{
self
.
returnSharingDialog
(
controller
,
sharingData
?
.
_modal_text
??
""
)
...
...
@@ -3414,7 +3415,7 @@ public class swiftApi {
}
}
func
initialSharingDialog
(
_
controller
:
UIViewController
,
_
alertHeaderTitle
:
String
,
_
alertTitle
:
String
,
_
sharingId
:
String
)
->
Void
{
func
initialSharingDialog
(
_
controller
:
UIViewController
,
_
alertHeaderTitle
:
String
,
_
alertTitle
:
String
,
_
sharingId
:
String
,
_
couponsetType
:
String
)
->
Void
{
let
alert
=
UIAlertController
(
title
:
alertHeaderTitle
,
message
:
alertTitle
,
preferredStyle
:
.
alert
)
...
...
@@ -3458,7 +3459,7 @@ public class swiftApi {
DispatchQueue
.
main
.
async
{
if
(
sharingData
?
.
getStatus
==
1
)
{
self
.
acceptSharingDialog
(
controller
)
self
.
acceptSharingDialog
(
controller
,
couponsetType
)
swiftApi
()
.
getCouponsAsync
(
getCouponsCallback
,
failureCallback
:
{
errorCode
in
})
...
...
@@ -3549,9 +3550,16 @@ public class swiftApi {
}
}
func
acceptSharingDialog
(
_
controller
:
UIViewController
)
->
Void
{
func
acceptSharingDialog
(
_
controller
:
UIViewController
,
_
couponsetType
:
String
)
->
Void
{
let
alert
=
UIAlertController
(
title
:
"Συγχαρητήρια!"
,
message
:
"Το δώρο σου ενεργοποιήθηκε επιτυχώς στο My Rewards!"
,
preferredStyle
:
.
alert
)
var
alertMessage
=
""
if
(
couponsetType
!=
""
&&
couponsetType
==
"supermarket"
)
{
alertMessage
=
"Το δώρο σου ενεργοποιήθηκε επιτυχώς στο καλάθι του SuperMarket Deals!"
}
else
{
alertMessage
=
"Το δώρο σου ενεργοποιήθηκε επιτυχώς στο My Rewards!"
}
let
alert
=
UIAlertController
(
title
:
"Συγχαρητήρια!"
,
message
:
alertMessage
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
{
action
in
switch
action
.
style
{
case
.
default
:
...
...
@@ -4931,12 +4939,14 @@ public class swiftApi {
private
var
status
:
String
private
var
status_outer
:
Int
private
var
msg
:
String
private
var
couponset_type
:
String
init
()
{
self
.
modal_text
=
""
self
.
status
=
""
self
.
status_outer
=
-
1
self
.
msg
=
""
self
.
couponset_type
=
""
}
init
(
dictionary
:
[
String
:
Any
])
{
...
...
@@ -4946,6 +4956,7 @@ public class swiftApi {
self
.
status_outer
=
dictionary
[
"status"
]
as?
Int
??
-
1
self
.
msg
=
dictionary
[
"msg"
]
as?
String
??
""
self
.
couponset_type
=
dictionary
[
"couponset_type"
]
as?
String
??
""
}
public
var
_modal_text
:
String
{
...
...
@@ -4983,6 +4994,15 @@ public class swiftApi {
self
.
msg
=
newValue
}
}
public
var
_couponset_type
:
String
{
get
{
// getter
return
self
.
couponset_type
}
set
(
newValue
)
{
//setter
self
.
couponset_type
=
newValue
}
}
}
...
...
Please
register
or
login
to post a comment