Manos Chorianopoulos

fix WarplyPacingEventModel

......@@ -59,17 +59,19 @@ import SwiftEventBus
let couponEvent = swiftApi.CouponEventModel()
SwiftEventBus.post("coupon_retrieved", sender: couponEvent)
} else if (eventArray[2] == "serviceDisabled") {
let pacingService = swiftApi.WarplyPacingEventModel()
pacingService._isEnabled = false
SwiftEventBus.post("pacing", sender: pacingService)
}
// else if (eventArray[2] == "serviceDisabled") {
// let pacingService = swiftApi.WarplyPacingEventModel()
// pacingService._isEnabled = false
// SwiftEventBus.post("pacing", sender: pacingService)
} else if (eventArray[2] == "serviceEnabled") {
let pacingService = swiftApi.WarplyPacingEventModel()
pacingService._isEnabled = true
SwiftEventBus.post("pacing", sender: pacingService)
// } else if (eventArray[2] == "serviceEnabled") {
// let pacingService = swiftApi.WarplyPacingEventModel()
// pacingService._isEnabled = true
// SwiftEventBus.post("pacing", sender: pacingService)
} else if (eventArray[2] == "shortcutEnabled") {
// }
else if (eventArray[2] == "shortcutEnabled") {
let pacingEvent = swiftApi.WarplyPacingEventModel()
pacingEvent._isVisible = true
SwiftEventBus.post("pacing", sender: pacingEvent)
......
......@@ -2037,23 +2037,12 @@ public class swiftApi {
public class WarplyPacingEventModel {
private var isEnabled: Bool
private var isVisible: Bool
public init() {
self.isEnabled = false
self.isVisible = false
}
public var _isEnabled: Bool {
get { // getter
return self.isEnabled
}
set(newValue) { //setter
self.isEnabled = newValue
}
}
public var _isVisible: Bool {
get { // getter
return self.isVisible
......