Manos Chorianopoulos

fix questionnaire shown at carusel

...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>1</integer> 10 + <integer>0</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>0</integer> 10 + <integer>1</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -132,6 +132,11 @@ var timer2: DispatchSourceTimer? ...@@ -132,6 +132,11 @@ var timer2: DispatchSourceTimer?
132 if (eventArray[0] == "event") { 132 if (eventArray[0] == "event") {
133 if (eventArray[1] == "closeArtwork") { 133 if (eventArray[1] == "closeArtwork") {
134 134
135 + self.navigationController?.popViewController(animated: true)
136 +
137 + } else if (eventArray[1] == "addUserTag") {
138 + // SwiftEventBus.post("questionnaire", sender: questionnaireEvent)
139 +
135 swiftApi().getProfileAsync(getProfileCallback) 140 swiftApi().getProfileAsync(getProfileCallback)
136 141
137 func getProfileCallback (_ profileData: swiftApi.ProfileModel?) -> Void { 142 func getProfileCallback (_ profileData: swiftApi.ProfileModel?) -> Void {
...@@ -142,6 +147,16 @@ var timer2: DispatchSourceTimer? ...@@ -142,6 +147,16 @@ var timer2: DispatchSourceTimer?
142 func getCampaignsCallback (_ campaignsData: Array<swiftApi.CampaignItemModel>?) -> Void { 147 func getCampaignsCallback (_ campaignsData: Array<swiftApi.CampaignItemModel>?) -> Void {
143 if (campaignsData != nil) { 148 if (campaignsData != nil) {
144 DispatchQueue.main.async { 149 DispatchQueue.main.async {
150 + let questionnaireEvent = swiftApi.QuestionnaireEventModel()
151 + questionnaireEvent._name = String(eventArray[1])
152 + if (eventArray.count > 2) {
153 + questionnaireEvent._parameter = String(eventArray[2])
154 + swiftApi().setUserTag(String(eventArray[2]))
155 + } else {
156 + questionnaireEvent._parameter = ""
157 + swiftApi().setUserTag("")
158 + }
159 + SwiftEventBus.post("questionnaire", sender: questionnaireEvent)
145 } 160 }
146 } else { 161 } else {
147 } 162 }
...@@ -152,19 +167,6 @@ var timer2: DispatchSourceTimer? ...@@ -152,19 +167,6 @@ var timer2: DispatchSourceTimer?
152 } 167 }
153 } 168 }
154 169
155 - self.navigationController?.popViewController(animated: true)
156 -
157 - } else if (eventArray[1] == "addUserTag") {
158 - let questionnaireEvent = swiftApi.QuestionnaireEventModel()
159 - questionnaireEvent._name = String(eventArray[1])
160 - if (eventArray.count > 2) {
161 - questionnaireEvent._parameter = String(eventArray[2])
162 - swiftApi().setUserTag(String(eventArray[2]))
163 - } else {
164 - questionnaireEvent._parameter = ""
165 - swiftApi().setUserTag("")
166 - }
167 - SwiftEventBus.post("questionnaire", sender: questionnaireEvent)
168 170
169 } else if (eventArray[1] == "couponRetrieved") { 171 } else if (eventArray[1] == "couponRetrieved") {
170 // let couponEvent = swiftApi.CouponEventModel() 172 // let couponEvent = swiftApi.CouponEventModel()
......