Manos Chorianopoulos

fix badge persisting for different users

...@@ -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 }
...@@ -1205,6 +1207,17 @@ public class swiftApi { ...@@ -1205,6 +1207,17 @@ public class swiftApi {
1205 verifyTicketCallback(nil) 1207 verifyTicketCallback(nil)
1206 } 1208 }
1207 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 + }
1220 +
1208 } 1221 }
1209 } 1222 }
1210 1223
......