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 15:26:51 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7ac63b0e0bc4485592d5c40e568d933bf02d9556
7ac63b0e
1 parent
b06912d5
add pacing widget event
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/CampaignViewController.swift
View file @
7ac63b0
...
...
@@ -191,17 +191,17 @@ var timer2: DispatchSourceTimer?
}
else
if
(
eventArray
[
1
]
==
"couponShared"
)
{
}
// else if (eventArray[2] == "service
Disabled") {
// let pacingService = swiftApi.WarplyPacing
EventModel()
// pacingService._isEnabled
= false
// SwiftEventBus.post("pacing", sender: pacingService
)
else
if
(
eventArray
[
1
]
==
"steps"
&&
eventArray
[
2
]
==
"widget
Disabled"
)
{
let
pacingWidget
=
swiftApi
.
WarplyPacingCard
EventModel
()
pacingWidget
.
_isVisible
=
false
SwiftEventBus
.
post
(
"pacing_widget"
,
sender
:
pacingWidget
)
// } else if (eventArray[2] == "service
Enabled") {
// let pacingService = swiftApi.WarplyPacing
EventModel()
// pacingService._isEnabled
= true
// SwiftEventBus.post("pacing", sender: pacingService
)
}
else
if
(
eventArray
[
1
]
==
"steps"
&&
eventArray
[
2
]
==
"widget
Enabled"
)
{
let
pacingWidget
=
swiftApi
.
WarplyPacingCard
EventModel
()
pacingWidget
.
_isVisible
=
true
SwiftEventBus
.
post
(
"pacing_widget"
,
sender
:
pacingWidget
)
//
}
}
else
if
(
eventArray
[
1
]
==
"steps"
&&
eventArray
[
2
]
==
"shortcutEnabled"
)
{
let
pacingEvent
=
swiftApi
.
WarplyPacingEventModel
()
pacingEvent
.
_isVisible
=
true
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
7ac63b0
...
...
@@ -3328,6 +3328,24 @@ public class swiftApi {
}
public
class
WarplyPacingCardEventModel
{
private
var
isVisible
:
Bool
public
init
()
{
self
.
isVisible
=
false
}
public
var
_isVisible
:
Bool
{
get
{
// getter
return
self
.
isVisible
}
set
(
newValue
)
{
//setter
self
.
isVisible
=
newValue
}
}
}
public
func
openQuestionnaire
(
_
controller
:
UIViewController
)
->
Void
{
for
item
in
GlobalVariables
.
campaigns
{
if
(
item
.
offer_category
==
"questionnaire"
)
{
...
...
Please
register
or
login
to post a comment