Manos Chorianopoulos

fix webview events crashing

......@@ -59,6 +59,8 @@ import SwiftEventBus
let couponEvent = swiftApi.CouponEventModel()
SwiftEventBus.post("coupon_retrieved", sender: couponEvent)
} else if (eventArray[1] == "couponShared") {
}
// else if (eventArray[2] == "serviceDisabled") {
// let pacingService = swiftApi.WarplyPacingEventModel()
......@@ -71,12 +73,12 @@ import SwiftEventBus
// SwiftEventBus.post("pacing", sender: pacingService)
// }
else if (eventArray[2] == "shortcutEnabled") {
else if (eventArray[1] == "steps" && eventArray[2] == "shortcutEnabled") {
let pacingEvent = swiftApi.WarplyPacingEventModel()
pacingEvent._isVisible = true
SwiftEventBus.post("pacing", sender: pacingEvent)
} else if (eventArray[2] == "shortcutDisabled") {
} else if (eventArray[1] == "steps" && eventArray[2] == "shortcutDisabled") {
let pacingEvent = swiftApi.WarplyPacingEventModel()
pacingEvent._isVisible = false
SwiftEventBus.post("pacing", sender: pacingEvent)
......