Showing
1 changed file
with
6 additions
and
2 deletions
| ... | @@ -45,10 +45,14 @@ import SwiftEventBus | ... | @@ -45,10 +45,14 @@ import SwiftEventBus | 
| 45 | } else if (eventArray[1] == "addUserTag") { | 45 | } else if (eventArray[1] == "addUserTag") { | 
| 46 | let questionnaireEvent = swiftApi.QuestionnaireEventModel() | 46 | let questionnaireEvent = swiftApi.QuestionnaireEventModel() | 
| 47 | questionnaireEvent._name = String(eventArray[1]) | 47 | questionnaireEvent._name = String(eventArray[1]) | 
| 48 | + if (eventArray.count > 2) { | ||
| 48 | questionnaireEvent._parameter = String(eventArray[2]) | 49 | questionnaireEvent._parameter = String(eventArray[2]) | 
| 49 | - SwiftEventBus.post("questionnaire", sender: questionnaireEvent) | ||
| 50 | - | ||
| 51 | swiftApi().setUserTag(String(eventArray[2])) | 50 | swiftApi().setUserTag(String(eventArray[2])) | 
| 51 | + } else { | ||
| 52 | + questionnaireEvent._parameter = "" | ||
| 53 | + swiftApi().setUserTag("") | ||
| 54 | + } | ||
| 55 | + SwiftEventBus.post("questionnaire", sender: questionnaireEvent) | ||
| 52 | 56 | ||
| 53 | } else if (eventArray[1] == "couponRetrieved") { | 57 | } else if (eventArray[1] == "couponRetrieved") { | 
| 54 | let couponEvent = swiftApi.CouponEventModel() | 58 | let couponEvent = swiftApi.CouponEventModel() | ... | ... | 
- 
Please register or login to post a comment
