Showing
1 changed file
with
13 additions
and
0 deletions
... | @@ -1192,6 +1192,8 @@ public class swiftApi { | ... | @@ -1192,6 +1192,8 @@ public class swiftApi { |
1192 | 1192 | ||
1193 | verifyTicketCallback(tempResponse); | 1193 | verifyTicketCallback(tempResponse); |
1194 | 1194 | ||
1195 | + swiftApi().getProfileAsync(getProfileCallback) | ||
1196 | + | ||
1195 | } else { | 1197 | } else { |
1196 | verifyTicketCallback(nil) | 1198 | verifyTicketCallback(nil) |
1197 | } | 1199 | } |
... | @@ -1204,6 +1206,17 @@ public class swiftApi { | ... | @@ -1204,6 +1206,17 @@ public class swiftApi { |
1204 | print("====================") | 1206 | print("====================") |
1205 | verifyTicketCallback(nil) | 1207 | verifyTicketCallback(nil) |
1206 | } | 1208 | } |
1209 | + | ||
1210 | + func getProfileCallback (_ profileData: swiftApi.ProfileModel?) -> Void { | ||
1211 | + if (profileData != nil) { | ||
1212 | + DispatchQueue.main.async { | ||
1213 | + swiftApi().setConsumer(profileData ?? swiftApi.ProfileModel()) | ||
1214 | + swiftApi().setUserTag(profileData?.badge ?? "") | ||
1215 | + } | ||
1216 | + } else { | ||
1217 | + | ||
1218 | + } | ||
1219 | + } | ||
1207 | 1220 | ||
1208 | } | 1221 | } |
1209 | } | 1222 | } | ... | ... |
-
Please register or login to post a comment