Manos Chorianopoulos

fix badge persisting for different users

......@@ -1192,6 +1192,8 @@ public class swiftApi {
verifyTicketCallback(tempResponse);
swiftApi().getProfileAsync(getProfileCallback)
} else {
verifyTicketCallback(nil)
}
......@@ -1204,6 +1206,17 @@ public class swiftApi {
print("====================")
verifyTicketCallback(nil)
}
func getProfileCallback (_ profileData: swiftApi.ProfileModel?) -> Void {
if (profileData != nil) {
DispatchQueue.main.async {
swiftApi().setConsumer(profileData ?? swiftApi.ProfileModel())
swiftApi().setUserTag(profileData?.badge ?? "")
}
} else {
}
}
}
}
......